Unleash / unleash-proxy-client-js

A browser client that can be used together with the unleash-proxy.
Apache License 2.0
44 stars 46 forks source link

UserId strategy not working when compiled with XCode15 (IOS 17) #204

Closed wahmedswl closed 1 month ago

wahmedswl commented 1 month ago

Describe the bug

Hi!

UserId strategy is not working when React Native app is compiled with XCode 15. There seems to be multiple online threads that highlight this issue e.g https://forums.developer.apple.com/forums/thread/738432 and https://github.com/axios/axios/issues/6102. It was working fine untill XCode14 and it got broken after we migrated to XCode 15.

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

No response

Screenshots

No response

Additional context

No response

Unleash version

Unleash 4.17.1 (Open Source)

Subscription type

Open source

Hosting type

Self-hosted

SDK information (language and version)

unleash-proxy-client

wahmedswl commented 1 month ago

This issue seems be due to the way url encoding works and i guess moving to usePOSTrequests should resolve it. We are going to try this and will get back with the results.

ivarconr commented 1 month ago

It feels a bit out of our control if iOS17 breaks encoding, the SDK depends on browser specific APIs to URL encode the requests.

I suspect you have an "@" in the userId?

An alternative workaround would be to use some stort of custom encoding (always replace @ with "_" or something).

wahmedswl commented 1 month ago

@ivarconr Yes, we have @. usePOSTrequests this will not work?

ivarconr commented 1 month ago

usePOSTrequests will work if you connect to unleash-edge or unleash-proxy.

wahmedswl commented 1 month ago

@ivarconr Thanks! We have switched to usePOSTrequests and we are good now.