Closed BloodDragon2580 closed 1 month ago
The status code seems to be 401. This means that the environment variables USERNAME or PASSWORD are not set correctly. For PASSWORD, specify "the value set in AdminPassword in PalWorldSettings.ini". USERNAME should be left as admin and not changed.
Hmm password is correct. Base path must be the ip or it can be the Domain name?
Hmm password is correct. Base path must be the ip or it can be the Domain name?
No problem either way. The Status Code is 401, which means that the connection to the server is successful. In other words, BASE_PATH is correct.
What console is doing the build? Building with Windows (PowerShell) does not seem to work well.
C:\palworld-map>pnpm run build
> palworld-map@0.1.0 build C:\palworld-map
> next build
▲ Next.js 14.1.4
- Environments: .env
Creating an optimized production build ...
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (1/5) [=== ]
h [ResponseError]: Response returned an error code
at m.request (C:\palworld-map\.next\server\app\status\route.js:1:3004)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async m.getPlayersRaw (C:\palworld-map\.next\server\app\status\route.js:1:5599)
at async m.getPlayers (C:\palworld-map\.next\server\app\status\route.js:1:5745)
at async g (C:\palworld-map\.next\server\app\status\route.js:1:9113)
at async C:\palworld-map\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:42484
at async eI.execute (C:\palworld-map\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:32486)
at async eI.handle (C:\palworld-map\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:43737)
at async exportAppRoute (C:\palworld-map\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\export\routes\app-route.js:77:26)
at async exportPageImpl (C:\palworld-map\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\export\worker.js:175:20) {
response: Response {
[Symbol(realm)]: null,
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: true,
type: 'default',
status: 401,
timingInfo: [Object],
cacheState: '',
statusText: '',
headersList: [HeadersList],
urlList: [Array],
body: [Object]
},
[Symbol(headers)]: HeadersList {
cookies: null,
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
}
}
✓ Generating static pages (5/5)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ○ / 985 B 85.3 kB
├ ○ /_not-found 883 B 85.2 kB
└ λ /status 0 B 0 B
+ First Load JS shared by all 84.3 kB
├ chunks/672-6130f74c26b9f20b.js 29 kB
├ chunks/90234aad-18317e5d24c23e3a.js 53.4 kB
└ other shared chunks (total) 1.98 kB
○ (Static) prerendered as static content
λ (Dynamic) server-rendered on demand using Node.js
When i run it, it shows
C:\palworld-map>pnpm run start
> palworld-map@0.1.0 start C:\palworld-map
> next start
▲ Next.js 14.1.4
- Local: http://localhost:3000
✓ Ready in 946ms
The when i go on the Website it cones the error from first Post.
And at the Browser it comes: Application error: a client-side exception has occurred (see the browser console for more information).
Can I build with Node.js.command prompt?
I dont know the commands for node, it's my first time with it.
After few test i can see now the map for secounds
Than
C:\palworldmap>pnpm run start
> palworld-map@0.1.0 start C:\palworldmap
> next start
▲ Next.js 14.1.4
- Local: http://localhost:3000
✓ Ready in 933ms
p [FetchError]: The request failed and the interceptors did not return an alternative response
at m.fetchApi (C:\palworldmap\.next\server\app\status\route.js:1:2296)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async m.request (C:\palworldmap\.next\server\app\status\route.js:1:2929)
... 4 lines matching cause stack trace ...
at async eI.execute (C:\palworldmap\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:32486)
at async eI.handle (C:\palworldmap\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:43737)
at async doRender (C:\palworldmap\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\server\base-server.js:1317:42) {
cause: TypeError: fetch failed
at node:internal/deps/undici/undici:12618:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async globalThis.fetch (C:\palworldmap\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:36091)
at async m.fetchApi (C:\palworldmap\.next\server\app\status\route.js:1:2043)
at async m.request (C:\palworldmap\.next\server\app\status\route.js:1:2929)
at async m.getPlayersRaw (C:\palworldmap\.next\server\app\status\route.js:1:5598)
at async m.getPlayers (C:\palworldmap\.next\server\app\status\route.js:1:5744)
at async g (C:\palworldmap\.next\server\app\status\route.js:1:9112)
at async C:\palworldmap\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:42484
at async eI.execute (C:\palworldmap\node_modules\.pnpm\next@14.1.4_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:32486) {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:7760:28)
at node:internal/deps/undici/undici:7716:50
at Immediate._onImmediate (node:internal/deps/undici/undici:7746:37)
at process.processImmediate (node:internal/timers:478:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
}
I have found a solution to build by Windows. It seems that .env changes are not reflected on Windows. I am not sure if this is a bug caused by Next or Windows. To resolve this, you need to restart the terminal window. If you restart the terminal window, the .env changes will take effect.
After few test i can see now the map for secounds
Perhaps this means the server is busy or BASE_PATH is incorrect.
Nothing work on my server. Dont know. Thx anyway for the help.
Do you still get errors? If you edit the .env file, please restart your terminal window
Still the same error.
Did you solve the problem here? I am having the same problem. Authentication does not go through. When I open http://localhost:[REST_API_port]/v1/api/players in my browser, I get the information successfully and the password is correct because I copied and pasted it. I tried the build in PowerShell and at the node.js prompt, both with the same result.
nope still the same problem
it works on Linux. Upgrading Next.js might solve the issue, but I can't verify it since I stopped hosting Palworld.