First run always fails, second run works. Web sqlite error!?
Hey guys,
I got a really weird problem. The first execution of nwjs on a machine always fails. After the first execution failed and the process was killed, you can run the same binary and from then on it won't fail anymore.
I have no clue how to fix this, what do these Web sqlite errors mean?
Here's the unmodified bash log:
dev@woopwoop:/opt/lycheejs$ ./bin/ranger.sh
[4821:0605/132647:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[4821:0605/132647:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4821:0605/132647:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4821:0605/132647:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4821:0605/132647:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4821:0605/132647:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
Gtk-Message: Failed to load module "canberra-gtk-module"
[4821:0605/132647:ERROR:connection.cc(1060)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = PERSIST
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[4839:0605/132647:ERROR:sandbox_linux.cc(325)] InitializeSandbox() called with multiple threads in process gpu-process
[4821:0605/132648:ERROR:connection.cc(1060)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA cache_size=32
[4821:0605/132648:ERROR:connection.cc(1060)] Web sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
[4821:0605/132648:ERROR:web_data_service_backend.cc(54)] Cannot initialize the web database: 1
^C
dev@woopwoop:/opt/lycheejs$ killall ranger
dev@woopwoop:/opt/lycheejs$ killall ranger
ranger: no process found
dev@woopwoop:/opt/lycheejs$ ./bin/ranger.sh
[4910:0605/132707:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[4910:0605/132707:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4910:0605/132707:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4910:0605/132707:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4910:0605/132707:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
[4910:0605/132707:ERROR:browser_main_loop.cc(198)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
Gtk-Message: Failed to load module "canberra-gtk-module"
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[4931:0605/132707:ERROR:sandbox_linux.cc(325)] InitializeSandbox() called with multiple threads in process gpu-process
[4910:0605/132708:INFO:CONSOLE(4299)] ""bootstrap.js: Supported methods are console, Audio, Buffer, Image"", source: file:///tmp/.org.chromium.Chromium.uxu0yj/core.js (4299)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I am getting this consistently. Not able to debug at all.
I think that's may be unhalted exception somewhere.
Maybe running with --remote-debugging-port=something and then inspecting all of devconsoles with browser (http://localhost:something/) can help finding out that lost error message?
Am I right that removing /home/USER/.config/APPNAME is equal to running on fresh machine?
Is this issue still reproduced on the latest nwjs build? If so, could you please provide a sample and steps to reproduce it?
@Christywl: I'm going to report back in a few hours, when I'm able to test the new nw.js build (slow internet connection atm).
@Christywl
It took me a while, but this error is now not occuring again with the newest builds. I tried the chromium v58 / v59 and v60 (beta) builds, all don't have this problem anymore. So this issue is fixed.
For reproduction purposes:
# app name is assumed to be "whatever"
rm -rf ~/.cache/whatever;
rm -rf ~/.config/whatever;
# start the app, where package.json has "whatever" as "name"
cd /path/to/whatever;
nw .;
I am not sure whether this is a follow-up problem or whether it should be reported somewhere else.
It seems that after a while, Web SQLite throws some errors. Note that I'm not using SQLite, localStorage, sessionStorage or anything related to cookies or permanent storage in the app code itself.
[0620/170048.270906:WARNING:chrome_main_delegate.cc(565)] final extension:
[20861:25680:0620/175820.240562:ERROR:connection.cc(1954)] DOMStorageDatabase sqlite error 1802, errno 0: disk I/O error, sql: INSERT INTO ItemTable VALUES (?,?)
[20861:25680:0620/175820.240605:ERROR:connection.cc(1954)] DOMStorageDatabase sqlite error 1, errno 0: cannot commit - no transaction is active, sql: COMMIT
[20861:25680:0620/175826.286699:ERROR:connection.cc(1954)] DOMStorageDatabase sqlite error 1802, errno 0: disk I/O error, sql: INSERT INTO ItemTable VALUES (?,?)
[20861:25680:0620/175826.286764:ERROR:connection.cc(1954)] DOMStorageDatabase sqlite error 1, errno 0: cannot commit - no transaction is active, sql: COMMIT
However, this is not blocking and not running in an endless loop as reported initially. So if this problem is already reported somewhere else (or doesn't matter) this issue can be closed.
Could you please provide your codes for me to reproduce this error?
It's not code-specific, it will happen with any nwjs app that simply has only an index.html and a package.json file. I'm not using the SQLite API if there exists any, neither localStorage or sessionStorage. The "DomStorageDatabase sqlite error" is related to internal nwjs behaviour, not related to app-specific code of any kind.
I use a simple test and can't reproduce this error with nwjs-sdk-v0.25.4.
test@test-dev:~/nwjs/build/nwjs-sdk-v0.25.4-linux-x64$ ./nw ../../bugs/3552
package.json:
{
"name":"3552",
"main":"index.html"
}
index.html:
<!DOCTYPE html>
<html>
<title>HTML Tutorial</title>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.