Neo4j Desktop Issue

[2021-07-10 17:49:40.767] [error] App initialization error SyntaxError: Malformed JSON in file: C:\Users\Admin.Neo4jDesktop\persist\userData.json
Unexpected token in JSON at position 0
at FileAsync.parse [as deserialize] ()
at E:\Neo4j Software\Neo4j Desktop\resources\app.asar\node_modules\lowdb\adapters\FileAsync.js:41:35
at async E:\Neo4j Software\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:179463
at async App. (E:\Neo4j Software\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:226871)
The same error log file after installing the new version in different folder.....It still can't launch the app..

Before I installed the new version: The neo4j desktop app stopped working. I found this file in log: [2021-07-05 10:54:42.584] [error] App initialization error: SyntaxError: Malformed JSON in file: C:\Users\Admin.Neo4jDesktop\persist\userData.json
Unexpected token in JSON at position 0 {
constructor: 'SyntaxError',
stack: 'SyntaxError: Malformed JSON in file: C:\Users\Admin\.Neo4jDesktop\persist\userData.json\n' +
'Unexpected token \u0000 in JSON at position 0\n' +
' at FileAsync.parse [as deserialize] ()\n' +
' at E:\GraphDatabase\Neo4j Desktop\resources\app.asar\node_modules\lowdb\adapters\FileAsync.js:41:35\n' +
' at async E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:169182\n' +
' at async $ (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:84153)'
}

Not sure why the file becomes corrupt. But if you delete C:\Users\Admin.Neo4jDesktop\persist\userData.json and try to start. Does it work?

1 Like

Just one thing, could you post what’s inside the userData.json file? It would be interesting to know what has corrupted it.

1 Like

userData json
Should I delete userData.json file?

Hello! I can't open and see anything in the userData.json file because it's either binary or unsupported text encoding .

. Here is the things inside the userData.json file. What should I do it? please...

Should I delete that one userData.json file?

Yes, delete it and see if that helps. You might need to select the storage location again since that is saved into the userData file.

1 Like

I see this before I deleted and install/reinstall new version 1. 4. 7 again.

[2021-07-12 10:13:35.585] [error] App initialization error SyntaxError: Malformed JSON in file: C:\Users\Admin.Neo4jDesktop\persist\userData.json
Unexpected token in JSON at position 0
at FileAsync.parse [as deserialize] ()
at E:\Neo4j Software\Neo4j Desktop\resources\app.asar\node_modules\lowdb\adapters\FileAsync.js:41:35
at async E:\Neo4j Software\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:179463
at async App. (E:\Neo4j Software\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:226871)

I just deleted userData json file and uninstall/reinstall. But, it sill not working. I found this errors log again. It 's a bit different the previous error log.

[2021-07-12 14:50:39.706] [error] App initialization error Error: EPERM: operation not permitted, mkdir 'C:\PROGRA~2\ADOPTO~1\JRE-80~1.08-\Neo4j'

After deleted the userData json file and reinstall again. It's still can't launch the Neo4j Desktop Screen yet.

[2021-07-12 14:57:14.191] [error] App initialization error Error: EPERM: operation not permitted, mkdir 'C:\PROGRA~2\ADOPTO~1\JRE-80~1.08-\Neo4j'
[2021-07-12 14:58:08.155] [info] Starting Neo4j Desktop 1.4.7 @ Windows_NT 10.0.14393
[2021-07-12 14:58:08.201] [error] Protocol Manager error TypeError [ERR_INVALID_URL]: Invalid URL: --allow-file-access-from-files
at onParseError (internal/url.js:256:9)
at new URL (internal/url.js:332:5)
at Object.t.default (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:196083)
at App. (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:226684)
at App.emit (events.js:315:20)
at App.EventEmitter.emit (domain.js:483:12)
at App.emitter.emit (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\node_modules@sentry\electron\dist\main\integrations\electron.js:66:25)
[2021-07-12 15:00:06.056] [info] Starting Neo4j Desktop 1.4.7 @ Windows_NT 10.0.14393
[2021-07-12 15:00:06.088] [error] Protocol Manager error TypeError [ERR_INVALID_URL]: Invalid URL: --allow-file-access-from-files
at onParseError (internal/url.js:256:9)
at new URL (internal/url.js:332:5)
at Object.t.default (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:196083)
at App. (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:226684)
at App.emit (events.js:315:20)
at App.EventEmitter.emit (domain.js:483:12)
at App.emitter.emit (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\node_modules@sentry\electron\dist\main\integrations\electron.js:66:25)

When I install, I chose the location E:\GraphDatabase\Neo4j Desktop..instead of C: Program File/.....Is it problem? I'm still trying to solve it...Hope anyone can help me for my graph databases that I have already populated with Neo4j for my school assignment soon!! I am a very new with Neo4j graph database but I love to learn and work with it for my projects.

The operation not permitted, mkdir 'C:\PROGRA~2\ADOPTO~1\JRE-80~1.08-\Neo4j' error, what is located on that path? What happens if you just rename that Neo4j folder?

Wait, do you have Java 8 from oracle installed on your machine? We provide Java runtimes within Desktop and you don't need to have Java installed separately, to me it seems like there's some kind of dependency issue with the installed version of Java which Neo4j Desktop doesn't have enough privileges to run. I'm not a Windows user myself, so I can't really be sure what is happening. But my tip is to uninstall Java 8 (unless you need it for something else), and try again.

1 Like

I have already uninstall AdoptOpenJDK JRE with Hotspot 8.0.242.08 (x86) from my computer. But, Neo4j Desktop still can't launch yet. Here are the things in the log file...

[2021-07-14 13:07:06.844] [error] App initialization error Error: EPERM: operation not permitted, mkdir 'C:\PROGRA~2\ADOPTO~1\JRE-80~1.08-\Neo4j'
[2021-07-14 13:10:50.288] [info] Starting Neo4j Desktop 1.4.7 @ Windows_NT 10.0.14393
[2021-07-14 13:10:50.338] [error] Protocol Manager error TypeError [ERR_INVALID_URL]: Invalid URL: --allow-file-access-from-files
at onParseError (internal/url.js:256:9)
at new URL (internal/url.js:332:5)
at Object.t.default (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:196083)
at App. (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:226684)
at App.emit (events.js:315:20)
at App.EventEmitter.emit (domain.js:483:12)
at App.emitter.emit (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\node_modules@sentry\electron\dist\main\integrations\electron.js:66:25)
[2021-07-14 13:13:52.681] [info] Starting Neo4j Desktop 1.4.7 @ Windows_NT 10.0.14393
[2021-07-14 13:13:52.716] [error] Protocol Manager error TypeError [ERR_INVALID_URL]: Invalid URL: --allow-file-access-from-files
at onParseError (internal/url.js:256:9)
at new URL (internal/url.js:332:5)
at Object.t.default (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:196083)
at App. (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\dist\main.prod.js:1:226684)
at App.emit (events.js:315:20)
at App.EventEmitter.emit (domain.js:483:12)
at App.emitter.emit (E:\GraphDatabase\Neo4j Desktop\resources\app.asar\node_modules@sentry\electron\dist\main\integrations\electron.js:66:25)

After uninstall AdoptOpenJDK, I still see this folder in the following path....

C:\Program Files (x86)\AdoptOpenJDK\jre-8.0.242.08-hotspot

You uninstalled 8.0.242.08, but since the version that Desktop picks up has JRE-80~1.08- as the folder it seems to be a lower version than you uninstalled. Maybe try and uninstall that version too? I'm going to investigate if I can replicate the issue... it's weird that Desktop picks that path up on start...

1 Like

Or, I misunderstood. My guess is that there's something left behind in your env path. Can you check if you have any lingering JAVA_HOME variables or similar?

To create or modify environment variables on Windows :

1. Right-click the Computer icon and choose Properties, or in **Windows** Control Panel, choose System.
2. Choose Advanced system settings. ...
3. On the Advanced tab, click **Environment Variables** . ...
4. Click New to create a new **environment variable** .
1 Like

Two other environment variables that could be of interest are APPDATA and LOCALAPPDATA. If they have become overwritten with a path to Program files... Not sure why it would happen, but something to look into. The reason Desktop fails to start is because of permission issues when trying to create a folder (in a non standard location).

1 Like

Here is the things from the JAVA-HOME variables in my Window.