Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: invalid credentials #5

Open
devZer0 opened this issue Apr 10, 2021 · 1 comment
Open

java.lang.IllegalArgumentException: invalid credentials #5

devZer0 opened this issue Apr 10, 2021 · 1 comment

Comments

@devZer0
Copy link

devZer0 commented Apr 10, 2021

hello,

i have problems with your tool, i tried email and username for -u , but if fails for both.

we are migrating different rocketchat channels and want to preserve the old content.

can you help?

regards
roland

# java -jar ./rocketchat-exporter-1.1.0.jar --host "https://rocketchat.wechange.de" -o ./out -u "<myusername>" --debug
Please enter your RocketChat password:

Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: --> POST https://rocketchat.wechange.de/api/v1/login
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Content-Type: application/json; charset=UTF-8
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Content-Length: 63
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO:
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: {"user":"<myusername>","password":"<mypassword>"}
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: --> END POST (63-byte body)
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: --> POST https://rocketchat.wechange.de/api/v1/login h2
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Content-Type: application/json; charset=UTF-8
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Content-Length: 63
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Host: rocketchat.wechange.de
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Connection: Keep-Alive
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: Accept-Encoding: gzip
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: User-Agent: okhttp/3.14.3
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO:
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: {"user":"<myusername>","password":"<mypassword>"}
Apr 10, 2021 1:07:54 PM okhttp3.internal.platform.Platform log
INFO: --> END POST (63-byte body)
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: <-- 401 https://rocketchat.wechange.de/api/v1/login (746ms)
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: server: nginx
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: date: Sat, 10 Apr 2021 11:07:55 GMT
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: content-type: application/json
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-xss-protection: 1
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-content-type-options: nosniff
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-instance-id: BsyBTmrTgQZHk3MDz
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: cache-control: no-store
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: pragma: no-cache
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-ratelimit-limit: 10000
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-ratelimit-remaining: 9999
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-ratelimit-reset: 1618052934684
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: access-control-allow-origin: *
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, X-User-Id, X-Auth-Token
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: vary: Accept-Encoding
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: content-encoding: gzip
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO:
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: {"status":"error","error":"Unauthorized","message":"Unauthorized"}
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: <-- END HTTP (66-byte, 65-gzipped-byte body)
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: <-- 401 https://rocketchat.wechange.de/api/v1/login (1066ms)
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: server: nginx
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: date: Sat, 10 Apr 2021 11:07:55 GMT
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: content-type: application/json
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-xss-protection: 1
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-content-type-options: nosniff
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-instance-id: BsyBTmrTgQZHk3MDz
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: cache-control: no-store
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: pragma: no-cache
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-ratelimit-limit: 10000
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-ratelimit-remaining: 9999
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: x-ratelimit-reset: 1618052934684
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: access-control-allow-origin: *
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, X-User-Id, X-Auth-Token
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: vary: Accept-Encoding
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO:
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: {"status":"error","error":"Unauthorized","message":"Unauthorized"}
Apr 10, 2021 1:07:55 PM okhttp3.internal.platform.Platform log
INFO: <-- END HTTP (66-byte body)
java.lang.RuntimeException: java.lang.IllegalArgumentException: invalid credentials
	at at.favre.tools.rocketexporter.cli.Export.run(Export.java:158)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
	at picocli.CommandLine.execute(CommandLine.java:1864)
	at at.favre.tools.rocketexporter.cli.Export.main(Export.java:44)
Caused by: java.lang.IllegalArgumentException: invalid credentials
	at at.favre.tools.rocketexporter.RocketExporter$Default.login(RocketExporter.java:168)
	at at.favre.tools.rocketexporter.cli.Export.run(Export.java:68)
	... 7 more
@ConradSelig
Copy link

I had this same issue - the problem was that I had 2FA enabled on the account I was trying to use the exporter with. Maybe yours is the same way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants