[ANDROID ONLY ISSUES]: await FileSystem.downloadAsync / base64 data uri => Error: unexpected url

#1

Hi,

have the following issue on android and expo v 29.0.

Using await FileSystem.downloadAsync(‘data:application/pdf;base64,somecontent’,FileSystem.cacheDirectory + “download.pdf”);will result in an error on Android. On iOS it’s working perfect.

My error is:

[Unhandled promise rejection: Error: unexpected url: data:application/pdf;base64,JJSBropvEZ1QCYEY]

Stack trace:
node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:121:42 in createErrorFromErrorData
node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:78:57 in
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:398:4 in __invokeCallback
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:137:28 in
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:314:6 in __guardSafe
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:136:17 in invokeCallbackAndReturnFlushedQueue

Any suggestions?

Many thanks for your help,
Marcus

3 Likes
closed #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.