You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using <allow-navigation href="file://"></allow-navigation> crashes parseWhitelistUrlForATS on iOS.
TypeError: Cannot read property 'indexOf' of null
at parseWhitelistUrlForATS (.../.cordova/platforms/ios/cordova/lib/prepare.js:1056:27)
at .../.cordova/platforms/ios/cordova/lib/prepare.js:982:23
at Array.reduce (<anonymous>)
at processAccessAndAllowNavigationEntries (.../.cordova/platforms/ios/cordova/lib/prepare.js:973:10)
at writeATSEntries (.../.cordova/platforms/ios/cordova/lib/prepare.js:1099:16)
at updateProject (.../.cordova/platforms/ios/cordova/lib/prepare.js:215:15)
at .../.cordova/platforms/ios/cordova/lib/prepare.js:59:20
at _fulfilled (.../.cordova/node_modules/q/q.js:854:54)
at .../.cordova/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (.../.cordova/node_modules/q/q.js:816:13)"
What is expected to happen?
"Nothing", as the setting is the default.
What does actually happen?
An error that indexOf isn't a function on undefined :)
I have added a potential fix for the crash. In the mean time, there is no benefit to adding 'file://' to your whitelist since it is already allowed. If you feel you must, then please use 'file://*'
Bug Report
Problem
Using
<allow-navigation href="file://"></allow-navigation>
crashesparseWhitelistUrlForATS
on iOS.What is expected to happen?
"Nothing", as the setting is the default.
What does actually happen?
An error that
indexOf
isn't a function on undefined :)Information
cordova-ios/bin/templates/scripts/cordova/lib/prepare.js
Lines 1051 to 1068 in 5e688ca
As per the documentation the value
file://
is the default (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/), but when using that value!retObject.HostName
is true-ish, but there is nohref.pathname
.Version information
cordova-ios 5.0.0.
Checklist
The text was updated successfully, but these errors were encountered: