question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SQLite fails to instantiate

See original GitHub issue

🐛 Bug Report

Environment

Expo CLI 3.13.1 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 11.3/11C29 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ~16.9.0 => 16.9.23 
      @types/react-native: ~0.60.23 => 0.60.31 
      expo: ~36.0.0 => 36.0.2 
      react: ~16.9.0 => 16.9.0 
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4 
    npmGlobalPackages:
      expo-cli: 3.13.1
This project is expected to build for IOS, Android and Web. I have only tested in the web instance for first time setup; first time setup was not able to succeed.

Steps to Reproduce

The Default Snack for SQLite has this issue too; when I run the snack linked below I receive the error TypeError: Illegal invocation; I have determined this happens at the command const db = SQLite.openDatabase('FooBarTesting.db'); in my code and on the default snack.

Expected Behavior

It’s expected to work. 😃 If this is user error; then the documentation could be clearer for SQLite.

Actual Behavior

Fails to instantiate with the error:

bundle.js:124604 Uncaught (in promise) TypeError: Illegal invocation
    at addToIndexedDB$ (bundle.js:124604)
    at tryCatch (bundle.js:119975)
    at Generator.invoke [as _invoke] (bundle.js:120201)
    at Generator.prototype.<computed> [as next] (bundle.js:120027)
    at tryCatch (bundle.js:119975)
    at invoke (bundle.js:120065)
    at bundle.js:120100
    at new Promise (<anonymous>)
    at callInvokeWithMethodAndArg (bundle.js:120099)
    at AsyncIterator.enqueue [as _invoke] (bundle.js:120122)
    at AsyncIterator.prototype.<computed> [as next] (bundle.js:120027)
    at Object.../../../../../../../../../../../Documents/localProjectFiles/Personal Projects/ManaSaga_ReactNative/node_modules/regenerator-runtime/runtime.js.exports.async (bundle.js:120146)
    at addToIndexedDB (bundle.js:124600)
    at bundle.js:124524
    at Array.forEach (<anonymous>)
    at addToCache$ (bundle.js:124523)
    at tryCatch (bundle.js:119975)
    at Generator.invoke [as _invoke] (bundle.js:120201)
    at Generator.prototype.<computed> [as next] (bundle.js:120027)
    at tryCatch (bundle.js:119975)
    at invoke (bundle.js:120065)
    at bundle.js:120075

Reproducible Demo

https://github.com/expo/examples/tree/master/with-sqlite https://snack.expo.io/@charliecruzan/sqlite-example

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
andrioidcommented, May 18, 2020

Seems that the websql RFC is now deprecated and Expo no longer supports web.

Related: https://github.com/react-native-directory/website/pull/307

0reactions
EvanBaconcommented, Jul 15, 2020

We have updated the docs to also reflect that expo-sqlite does not support web.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLite occasionally fails to create :memory: database
I've noticed that even a :memory: database will files on disk if you create a temporary table. The temporary files for unix system...
Read more >
Why Sqlite parse error: line 1:94: expecting RPAREN, found ...
When I open my database file with sqlitebrowser3, it complains: ``` Sqlite parse error: line 1:94: expecting RPAREN, found 'OR'(CREATE TABLE ...
Read more >
CREATE TABLE - SQLite
The CREATE TABLE command. The "CREATE TABLE" command is used to create a new table in an SQLite database. A CREATE TABLE command...
Read more >
CREATE TRIGGER - SQLite
Unrecognized column names are silently ignored. It would be more helpful if SQLite would fail the CREATE TRIGGER statement if any of the...
Read more >
Initialize The SQLite Library
The sqlite3_initialize() routine returns SQLITE_OK on success. If for some reason, sqlite3_initialize() is unable to initialize the library (perhaps it is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found