Since an update with docker compose pull
and the call of /update?secret=
I get the error message that VITE_API_URL
is missing.
# in browser console = no UI
TypeError: (intermediate value).VITE_API_URL is undefined
Is this possibly due to the Javascvript?
How can I set up the assets fresh within the docker compose
container?
Why is the VITE_API_URL
variable missing?
This is not necessary if the assets are prebuilt, is it? Why is it requested?
My docker-compose.yml
points to:
app:
image: invoiceninja/invoiceninja:latest
Hi,
@david can you please advise?
maybe this helps, it comes from bundle.js:
-rw-r--r-- 1 1500 1500 6.1M Jul 8 00:00 bundle.js
~/ninja/dockerfiles/docker/app/public
bundle.js
seems to be a version from tonight.
These assets are fetched by the self-update job, right?
Maybe the build process has built under staging or local environment?
I wanted to know how the versions of bundle.js differ and maybe you can recognize something.
v5.10.4
compared to
v5.10.5
I think the new .includes()
will break the whole thing.
FYI… this appears to be the same issue
opened 02:03PM - 08 Jul 24 UTC
triage
## Setup
- Version: v5.10.5
- Environment: Cloudron
## Interface
- Flutter… : []
- React: [x]
- Both: []
## Describe the bug
This issue only arises since version 5.10.5.
Loading the react UI login view works fine.
After successful login and a brief loading indicator, the interface remains blank.
The crash can be seen in the browser console:
```
Uncaught TypeError: (intermediate value).VITE_API_URL is undefined
```
This is using the release tarball and not building from source. Looking at the minified bundle.js where the error occurs, the code in question is:
```
enabled:Sa()&&!{}.VITE_API_URL.includes("staging")
```
while this minified snippet is probably not useful, given that the env variable is prefixed with `VITE_` and otherwise also used like
```
{}.VITE_API_URL||window.location.origin||"https://invoicing.co"
```
I guess this is a release build issue as `VITE_API_URL` is not set but relied on to be a string (judging form the crash). Since the API_URL is not yet known during build time for selfhosting. I guess this should be set to an empty string during build?
Happy to provide more background info.
1 Like
david
July 8, 2024, 10:07pm
8
Not sure why this has popped up as the react release build pipe has not changed. I’ve added a fix in for this and tagged a new release, please let us know if v5.10.6 is broken.