[GH-ISSUE #30] Runtime errors on building and launching Browser app #7012

Closed
opened 2026-04-10 16:41:35 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @borasura on GitHub (May 3, 2022).
Original GitHub issue: https://github.com/actualbudget/actual/issues/30

I am trying to run the Actual app locally as suggested here, but the initial page takes forever to load with few errors in the Console. Few other users also reported the same issue on Discord, hence posting it here. Any suggestions to get past this issue is greatly appreciated!

browser-server.js:31 Refused to execute script from 'http://localhost:3001/kcab/kcab.worker.dev.js' because its MIME type ('text/html') is not executable. (anonymous) @ browser-server.js:31 browser-server.js:31 Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3001/kcab/kcab.worker.dev.js' failed to load. at http://localhost:3001/static/js/bundle.worker.js:8169:7

My development environment is Debian 10 and using Node v16.15.0

Originally created by @borasura on GitHub (May 3, 2022). Original GitHub issue: https://github.com/actualbudget/actual/issues/30 I am trying to run the Actual app locally as suggested [here](https://github.com/actualbudget/actual#run-locally), but the initial page takes forever to load with few errors in the Console. Few other users also reported the same issue on Discord, hence posting it here. Any suggestions to get past this issue is greatly appreciated! `browser-server.js:31 Refused to execute script from 'http://localhost:3001/kcab/kcab.worker.dev.js' because its MIME type ('text/html') is not executable. (anonymous) @ browser-server.js:31 browser-server.js:31 Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3001/kcab/kcab.worker.dev.js' failed to load. at http://localhost:3001/static/js/bundle.worker.js:8169:7` My development environment is Debian 10 and using Node v16.15.0
Author
Owner

@tjquinn1 commented on GitHub (May 3, 2022):

I am also facing the same issue on Windows 10 + WSL 2 Ubuntu

<!-- gh-comment-id:1116347393 --> @tjquinn1 commented on GitHub (May 3, 2022): I am also facing the same issue on Windows 10 + WSL 2 Ubuntu
Author
Owner

@sb18281 commented on GitHub (May 4, 2022):

I was having the same issue and after some tracing back I found some additional errors, referring to an issue in build-browser with [ is not defined

What fixed it for me was editing build-browser in /packages/loot-core/bin/build-browser

It seems the == comparison isn't a globally accepted comparator in shell scripts. See info here

By replacing the == with a single = I was able to run without that issue.

E.g
Line 10
if [ $NODE_ENV == 'development' ]; then became if [ $NODE_ENV = 'development' ]; then

<!-- gh-comment-id:1117094895 --> @sb18281 commented on GitHub (May 4, 2022): I was having the same issue and after some tracing back I found some additional errors, referring to an issue in _build-browser_ with `[ is not defined` What fixed it for me was editing build-browser in `/packages/loot-core/bin/build-browser` It seems the `==` comparison isn't a globally accepted comparator in shell scripts. See info [here](https://stackoverflow.com/questions/18102454/why-am-i-getting-an-unexpected-operator-error-in-bash-string-equality-test) By replacing the `==` with a single `=` I was able to run without that issue. E.g Line 10 `if [ $NODE_ENV == 'development' ]; then` became `if [ $NODE_ENV = 'development' ]; then`
Author
Owner

@tjquinn1 commented on GitHub (May 4, 2022):

@sb18281 Nice work, that did the trick, thanks. Did you raise a PR for the fix?
For the server config did you use localhost:3001?

<!-- gh-comment-id:1117518429 --> @tjquinn1 commented on GitHub (May 4, 2022): @sb18281 Nice work, that did the trick, thanks. Did you raise a PR for the fix? For the server config did you use localhost:3001?
Author
Owner

@sb18281 commented on GitHub (May 4, 2022):

@tjquinn1 Not yet! On my todo list for today! Glad it worked for you!

Server config is the next bit I'm trying to work through

<!-- gh-comment-id:1117938512 --> @sb18281 commented on GitHub (May 4, 2022): @tjquinn1 Not yet! On my todo list for today! Glad it worked for you! Server config is the next bit I'm trying to work through
Author
Owner

@borasura commented on GitHub (May 7, 2022):

@sb18281 Thank you very much. That fixed the issue. Closing this now.

<!-- gh-comment-id:1120182116 --> @borasura commented on GitHub (May 7, 2022): @sb18281 Thank you very much. That fixed the issue. Closing this now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#7012