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 does not block `BEGIN IMMEDIATE TRANSACTION` from multiple JS contexts

See original GitHub issue

Summary

SQLite does not block BEGIN IMMEDIATE TRANSACTION from multiple JS contexts. This causes an attempt to start a transaction inside a transaction when using the same (even different) WebSQL.Database instances.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS and Android

SDK Version (managed workflow only)

40 and 42

Environment

Expo CLI 4.7.3 environment info: System: OS: Windows 10 10.0.19043 Binaries: Node: 12.18.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE Yarn: 1.22.10 - ~\scoop\apps\nvm\current\nodejs\nodejs\yarn.CMD npm: 6.14.4 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD IDEs: Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7486908 npmPackages: expo: ^40.0.0 => 40.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 react-native-web: ^0.16.3 => 0.16.3 Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.io/@trajano/sqlite-transaction-block

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
trajanocommented, Jan 20, 2022

I think this is more of a problem on Expo Go when it reloads it may not close the WebSQL (since it does not expose the close()) method so we can’t do a useEffect return to close.

0reactions
github-actions[bot]commented, Mar 28, 2022

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transaction - SQLite
SQLite supports multiple simultaneous read transactions coming from separate database connections, possibly in separate threads or processes, ...
Read more >
Can different connections of the same sqlite's database begin ...
You can do SELECT operations on the database while another transaction is doing write operations. The SELECT will not see the writes (unless...
Read more >
Transactions auto-close when queuing microtasks between ...
What I am trying to do is avoid doing chained callbacks and use async/await, ... SQLite does not block BEGIN IMMEDIATE TRANSACTION from...
Read more >
SQLite database locking errors cause fatal errors - Drupal
Problem/Motivation. SQLite does not support row level locks, so when it executes a write statement it locks the entire database.
Read more >
SQLiteDatabase | Android Developers
OpenParams) to create the database file if it does not already exist. int, ENABLE_WRITE_AHEAD_LOGGING ... Begins a transaction in IMMEDIATE mode.
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