-
Notifications
You must be signed in to change notification settings - Fork 118
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
NativeXHR: Invalid url scheme 'null' #79
Comments
@signalpoint We will have look into your use case and respond soon. |
I'm running into this problem as well, have you guys figured out a way to solve it by any chance? :) @signalpoint @manish2788 Edit: I overlooked the workaround in |
Interesting to note that I've had reports of this error effecting some users but couldn't recreate it using the same url on a up to date test device. Until we realised the users with the error were on iOS v16.2. It does look like the NSURL class has had the parser updated in iOS v17, see https://developer.apple.com/documentation/foundation/nsurl#1663756
|
Thank you for this plugin, it really saved the day with regards to cordova + ios + xhr + cookies!
I wanted to point out an issue I had with the plugin though. For example, I am making a POST to a URL like this:
https://example.com/?q=api/foo.json&api-key=abc123!_^-etc
With
NativeXHRLogging
set tofull
, this error was being thrown to the Console:After some Googling, it seems that
NSURL
may need some encoding.To get around this, I added a one line patch to
performNativeXHR()
inCDVWKWebViewFileXhr.m
:I'm guessing if I were to encode the URL's query string parameters beforehand, that would eliminate the error (and the need for the patch). However, I haven't had to use
encodeURIComponent()
on either theq
orapi-key
query string parameters for any other client environment (e.g. cordova + android, web apps, older versions ios + cordova), so I wanted to document this situation for others that may experience it.Thank you again, and I hope this is helpful.
The text was updated successfully, but these errors were encountered: