Skip to content
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

undefined is not an object (Evaluating 'NativeModules["SQLite"][method]') #32

Closed
Moussawi7 opened this issue Feb 27, 2016 · 7 comments
Closed
Labels

Comments

@Moussawi7
Copy link

Hi,
Although that i followed the steps in the documentation, but i am unable to open the database.

var db = SQLite.openDatabase("test.db", "1.0", "Test Database", 200000, openCB, errorCB);

please find the screenshot:
screenshot_2016-02-27-13-45-54
Note that i am using react native _0.20_
Thank you.

@andpor
Copy link
Owner

andpor commented Feb 27, 2016

From very little information you provided I conclude you are trying Android. Not sure if it is native or pure Java. The RSOD indicate you React Native plugin is not properly installed in your app. Can't help you there since you did not provide any information on how you coded there.

@andpor andpor closed this as completed Feb 27, 2016
@mcnamee
Copy link

mcnamee commented Feb 28, 2016

Hi @Moussawi7
I had the same issue when upgrading React Native - when running react-native upgrade, it'll remove any previously linked libraries.

I needed to follow the install process again, and it's now back to working.

@Moussawi7
Copy link
Author

@mcnamee ,
Thanks a lot, you are absolutely right.
I re-installed react-native and followed the installation process and everything gonna fine.

@iSimar
Copy link

iSimar commented May 5, 2016

having this issue (using react native 23.1), tried the solution suggested by @mcnamee
no luck

@faizan-tariq-confiz
Copy link

I am having the same issue. Its working perfectly fine in iOS but having the exact same issue on android. I have also re-install react-native and sqlite but the issue still exists.

react-native-cli: 0.2.0
react-native: 0.25.1

@ajithamp
Copy link

ajithamp commented Nov 7, 2016

i am also having same issue
screenshot_1478522181

and my code is

class Sqlite extends Component {
componentWillMount() {
SQLite.openDatabase({ name: "testDB", createFromLocation: 1 }).then(() => { alert("success") });
}
render() {
return (


Welcome to React Native!


To get started, edit index.android.js


Double tap R on your keyboard to reload,{'\n'}
Shake or press menu button for dev menu


);
}
}

@andpor
Copy link
Owner

andpor commented Nov 7, 2016

It is due to improper installation. Please follow instructions and verification from README.

Repository owner locked and limited conversation to collaborators Nov 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants