Frontend: Axios HTTP client should be upgraded to v1.x #1598

Closed
opened 2026-02-20 00:16:35 -05:00 by deekerman · 6 comments
Owner

Originally created by @lastzero on GitHub (Nov 2, 2022).

As a developer, I want to use the latest Axios version to avoid possible security issues and bugs in the old version.

We use ^0.27.2 while the latest version currently is 1.1.3. When simply installing the latest version, our tests failed due to missing dependencies or other incompatibilities related to NodeJS. The compatibility and functionality of the frontend and all web browsers must as well be tested after the upgrade. Any help is much appreciated!

Originally created by @lastzero on GitHub (Nov 2, 2022). **As a developer, I want to use the latest [Axios](https://www.npmjs.com/package/axios) version to avoid possible security issues and bugs in the old version.** We use `^0.27.2` while the latest version currently is `1.1.3`. When simply installing the latest version, our tests failed due to missing dependencies or other incompatibilities related to NodeJS. The compatibility and functionality of the frontend and all web browsers must as well be tested after the upgrade. Any help is much appreciated!
deekerman 2026-02-20 00:16:35 -05:00
Author
Owner

@ltomes commented on GitHub (Nov 6, 2022):

I took a first pass look at this. Before upgrade, I have 7 failing unit tests for timezone related issues.
I'm going to start by seeing if I can programmatically set the expected datetime so the tests pass on different systems/timezones.

@ltomes commented on GitHub (Nov 6, 2022): I took a first pass look at this. Before upgrade, I have 7 failing unit tests for timezone related issues. I'm going to start by seeing if I can programmatically set the expected datetime so the tests pass on different systems/timezones.
Author
Owner

@lastzero commented on GitHub (Nov 6, 2022):

Run them in the Docker container which uses UTC.

@lastzero commented on GitHub (Nov 6, 2022): Run them in the Docker container which uses UTC.
Author
Owner

@ltomes commented on GitHub (Nov 6, 2022):

Run them in the Docker container which uses UTC.

I attempted that to start with, but ran into an error running docker compose -f "docker-compose.local.yml" up -d --build

initializing source docker://photoprism/photoprism:local: reading manifest local in docker.io/photoprism/photoprism: manifest unknown: manifest unknown

I'll talke another pass at using the provided compose...

@ltomes commented on GitHub (Nov 6, 2022): > Run them in the Docker container which uses UTC. I attempted that to start with, but ran into an error running `docker compose -f "docker-compose.local.yml" up -d --build` > initializing source docker://photoprism/photoprism:local: reading manifest local in docker.io/photoprism/photoprism: manifest unknown: manifest unknown I'll talke another pass at using the provided compose...
Author
Owner

@lastzero commented on GitHub (Nov 6, 2022):

See https://docs.photoprism.app/developer-guide/setup/

@lastzero commented on GitHub (Nov 6, 2022): See https://docs.photoprism.app/developer-guide/setup/
Author
Owner

@ltomes commented on GitHub (Nov 6, 2022):

See https://docs.photoprism.app/developer-guide/setup/

Same results in a container (make test-js):

TOTAL: 7 FAILED, 313 SUCCESS
TOTAL: 7 FAILED, 313 SUCCESS

Is there a chance these failures started this AM with the timezone shift?
I suppose I could just keep working on the task and ignore those 7 tests.

Re: the actual task, it seems rough.
Every dependency from webpack that axios-mock-adapter is expecting axios to use no longer exists since axios stopped using webpack.

The big pain points being http, https, stream, url, assert, zlib.
I don't see others using the mock adapter reporting the same errors so it could be something unique to photoprisms test setup.

@ltomes commented on GitHub (Nov 6, 2022): > See https://docs.photoprism.app/developer-guide/setup/ Same results in a container (`make test-js`): ```Chrome Headless 98.0.4758.102 (Linux x86_64): Executed 320 of 320 (7 FAILED) (0.358 secs / 0.136 secs) TOTAL: 7 FAILED, 313 SUCCESS TOTAL: 7 FAILED, 313 SUCCESS ``` Is there a chance these failures started this AM with the timezone shift? I suppose I could just keep working on the task and ignore those 7 tests. Re: the actual task, it seems rough. Every dependency from webpack that `axios-mock-adapter` is expecting `axios` to use no longer exists since `axios` stopped using webpack. The big pain points being `http`, `https`, `stream`, `url`, `assert`, `zlib`. I don't see others using the mock adapter reporting the same errors so it could be something unique to `photoprism`s test setup.
Author
Owner

@lastzero commented on GitHub (Nov 7, 2022):

Ignore the date errors as they are unrelated. Might have to improve them like you suggested 👍

@lastzero commented on GitHub (Nov 7, 2022): Ignore the date errors as they are unrelated. Might have to improve them like you suggested 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1598
No description provided.