The example's Simple Share Image Base 64 issues fails (undefined is not a function)
See original GitHub issueSteps to reproduce
- Install the example on android
- Click on ‘Simple Share Image Base 64’
Environment
- React Native version: 0.58.4
- React Native platform + platform version: android 7.1
react-native-share
Version: ^1.1.3
Actual behaviour
I get the following error:
undefined is not a function (evaluating 'Object.keys(styles)[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]()')
assembleStyles
index.delta?platform=android&dev=true&minify=false:24797:114
createCommonjsModule
index.delta?platform=android&dev=true&minify=false:23490:44
<unknown>
index.delta?platform=android&dev=true&minify=false:24719:42
<unknown>
index.delta?platform=android&dev=true&minify=false:23483:75
<unknown>
index.delta?platform=android&dev=true&minify=false:23484:5
loadModuleImplementation
index.delta?platform=android&dev=true&minify=false:265:14
guardedLoadModule
index.delta?platform=android&dev=true&minify=false:153:47
metroRequire
index.delta?platform=android&dev=true&minify=false:88:92
onUnhandled
index.delta?platform=android&dev=true&minify=false:23029:32
onUnhandled
index.delta?platform=android&dev=true&minify=false:23445:30
<unknown>
index.delta?platform=android&dev=true&minify=false:26651:26
_callTimer
index.delta?platform=android&dev=true&minify=false:26568:17
callTimers
index.delta?platform=android&dev=true&minify=false:26775:19
__callFunction
index.delta?platform=android&dev=true&minify=false:2481:49
<unknown>
index.delta?platform=android&dev=true&minify=false:2238:31
__guard
index.delta?platform=android&dev=true&minify=false:2435:15
callFunctionReturnFlushedQueue
index.delta?platform=android&dev=true&minify=false:2237:21
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
The example's Simple Share Image Base 64 issues fails ...
I was getting warning from rn-share but it could not be displayed correctly. You can open node_modules/react-native/Libraries/Promise.js and ...
Read more >JavaScript Problems — Image to Base64 String, Undefined vs ...
We've to call the function that's expected to throw an except within a function so that Jasmine can call it and check if...
Read more >Error getting image with "image-to-base-64" in react
The main issue here though, is with the image URL you are trying to request. The image URL at "via.placeholder.com/125/000000/FF0000?text=place+ ...
Read more >btoa() - Web APIs - MDN Web Docs - Mozilla
The btoa() method creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is ......
Read more >How Base64 encoding and decoding is done in node.js
Encoding the original string to base64: The Buffer class in Node.js can be used to convert a string to a series of bytes....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had similar issue in my code. Turns out that it is bug(?) in RN 0.58. I was getting warning from
rn-share
but it could not be displayed correctly.You can open
node_modules/react-native/Libraries/Promise.js
and replace:with just:
you will then get proper error from
react-native-share
that will tell you what is wrong.The solution in my case (android) was to perform manual installation (https://github.com/react-native-community/react-native-share#Android-Install) instead of
react-native link react-native-share