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

Crash with a blank read key #226

Open
hallee opened this issue May 30, 2017 · 1 comment
Open

Crash with a blank read key #226

hallee opened this issue May 30, 2017 · 1 comment

Comments

@hallee
Copy link

hallee commented May 30, 2017

KeenClient v3.6.1 crashes with a blank read key, with the error 'KeenNoWriteKeyProvided', reason: 'You tried to add an event without setting a write key, please set one!

This is after setting up the shared client with KeenClient.sharedClient(withProjectID: "xxxxxx", andWriteKey: "xxxxxx", andReadKey: "") in Swift.

Using any String (even a single letter) for andReadKey prevents the crash. andReadKey should really be optional and default to nil since it's not required to send events.

@baumatron
Copy link
Contributor

Thanks for reporting the issue, @hallee!

I'm trying to repro the issue and I'm not having much luck, maybe you can help me.

If I try to initialize the shared client with KeenClient.sharedClient(withProjectID: "xxxxxx", andWriteKey: "xxxxxx", andReadKey: ""), I get an error message E:Your readKey cannot be an empty string. with a nil value returned from sharedClient....

Could you provide a short snippet I could run to reproduce the exception?

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

No branches or pull requests

2 participants