radar-sdk-js icon indicating copy to clipboard operation
radar-sdk-js copied to clipboard

SDK initialization throws in Android Instagram webview

Open kincaidoneil opened this issue 2 years ago • 1 comments

In my testing, navigator.permissions is undefined in the Instagram webview on Android (Chrome 119 UA/Android 14/Pixel 8).

In this scenario, the initializing the SDK throws an error: https://github.com/radarlabs/radar-sdk-js/blob/14dd21248c8c4b3ed7073082c1d598978d25ac42/src/navigator.ts#L111-L113

Could this set the authorization to NOT_DETERMINED instead of throwing?

kincaidoneil avatar Dec 09 '23 02:12 kincaidoneil

Hi @kincaidoneil,

Thanks for opening the issue. I agree, I think that makes sense to treat a missing navigator or permissions as NOT_DETERMINED. We'll try and work these changes into a future release (can leave this issue open for the meantime).

The resulting error also should not affect the actual initialization of the SDK, as the call to get permissions should be happening asynchronously, but let me know if you're seeing otherwise.

kochis avatar Dec 09 '23 16:12 kochis