briankabiro/react-native-get-sms-android

Getting TypeError: undefined is not an object

rassemdev opened this issue · 3 comments

I created fresh new project using create-react-native-app AwesomeProject command. then i installed the plugin and copy all the code and paste it in app.js
after that i run it into expo, and getting the following errors:

TypeError: undefined is not an object (evaluating '_reactNativeGetSmsAndroid2.default.list')

This error is located at:
    in example (at registerRootComponent.js:35)
    in RootErrorBoundary (at registerRootComponent.js:34)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:78)
    in View (at AppContainer.js:102)
    in RCTView (at View.js:78)
    in View (at AppContainer.js:122)
    in AppContainer (at renderApplication.js:34)
* App.js:33:15 in listSMS
* App.js:24:4 in example
- node_modules/react-proxy/modules/createClassProxy.js:98:23 in <unknown>
- node_modules/react-proxy/modules/createClassProxy.js:96:6 in instantiate
- ... 26 more stack frames from framework internals

Hi, @rassemdev. Currently, the npm module doesn't work with Expo. You can try running it using react-native start on an emulator.

@briankabiro thanks for you reply, I changed the process. I created new app using react-native init my-project command. then i cd into my project and install the plugin using npm install react-native-get-sms-android --save this command and copy all the example code paste it in app.js. After that i run the project using react-native run-android. Still I'm getting those errors:

The development server returned response error code: 500

URL: http://localhost:8081/index.delta?platform=android&dev=true&minify=false

Body:
{"type":"InternalError","errors":[],"message":"Metro Bundler has encountered an internal error, please check your terminal error output for more details"}
processBundleResult
    BundleDownloader.java:266
access$200
    BundleDownloader.java:35
onResponse
    BundleDownloader.java:153
execute
    RealCall.java:135
run
    NamedRunnable.java:32
runWorker
    ThreadPoolExecutor.java:1113
run
    ThreadPoolExecutor.java:588
run
    Thread.java:818

killall node -9
solved the errors.. Thanks.. you can close this issue now. It is working