CommunitySolidServer: Migration from v6 to v7 fails: [AppRunner] {Primary} error: Could not start the server: Unexpected end of JSON input
Environment
- Docker image: solidproject/community-server:7.0.1
- Server version: 7.0.1
- ENV:
- CSS_CONFIG: config/file.json
Description
Crash due to an ill-formatted JSON-input.
When migrating from version v6.1.0 to v7.0.1 and passing command: “–confirmMigration” I get the following output:
solid-pod-1 | 2023-10-30T21:17:50.151Z [Components.js] info: Initiating component discovery from /community-server/
solid-pod-1 | 2023-10-30T21:17:51.533Z [Components.js] info: Discovered 168 component packages within 1309 packages
solid-pod-1 | 2023-10-30T21:17:51.539Z [Components.js] info: Initiating component loading
solid-pod-1 | 2023-10-30T21:18:16.175Z [Components.js] info: Registered 889 components
solid-pod-1 | 2023-10-30T21:18:16.176Z [Components.js] info: Loaded configs
solid-pod-1 | 2023-10-30T21:18:37.520Z [V6MigrationInitializer] {Primary} info: Migrating v6 data...
solid-pod-1 | 2023-10-30T21:20:14.261Z [AppRunner] {Primary} error: Could not start the server: Unexpected end of JSON input
solid-pod-1 | Could not start the server
solid-pod-1 | SyntaxError: Unexpected end of JSON input
solid-pod-1 | at JSON.parse (<anonymous>)
solid-pod-1 | at SingleContainerJsonStorage.getResourceEntries (/community-server/dist/init/migration/SingleContainerJsonStorage.js:34:31)
solid-pod-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
solid-pod-1 | at async SingleContainerJsonStorage.entries (/community-server/dist/storage/keyvalue/JsonResourceStorage.js:66:9)
solid-pod-1 | at async V6MigrationInitializer.handle (/community-server/dist/init/migration/V6MigrationInitializer.js:108:34)
solid-pod-1 | at async ConditionalHandler.handle (/community-server/dist/util/handlers/ConditionalHandler.js:46:24)
solid-pod-1 | at async SequenceHandler.handle (/community-server/dist/util/handlers/SequenceHandler.js:28:26)
solid-pod-1 | at async SequenceHandler.handle (/community-server/dist/util/handlers/SequenceHandler.js:28:26)
solid-pod-1 | at async SequenceHandler.handle (/community-server/dist/util/handlers/SequenceHandler.js:28:26)
solid-pod-1 | at async App.start (/community-server/dist/init/App.js:20:9)
solid-pod-1 exited with code 0
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 27 (8 by maintainers)
The OIDC flow failing should not be related to the migration failing. The migration actually deletes all those OIDC files related to sessions to make sure there is a clean start. And if migrating the actual accounts failed I would expect you to get an error when trying to log in.
During a standard OIDC authentication session you should indeed be redirected to the login page, but when successfully logging in, you should afterwards be redirected to the consent page, not the login page again. Can you check the server logs if it says anything about the login failing after trying to log in on the account page? Perhaps also clearing the cookies/internal storage/etc. of the URL on which the server is running might also help. I’m wondering if perhaps something goes wrong of what is remembered of a previous version.
I did not account for there being invalid JSON files in the internal state, might have to release a new version to account for that. Could you start the server with
--loggingLevel debugto potentially see at which file it crashes and check what the contents are of that file?