Development Issue
Unsure — not sure if this is tied to active WIP work on the phone or a genuine regression, reporting as observed.
Phone Version
3.15.1-beta.2 (from fxmanifest.lua)
Issue Description
Every time npwd starts (fresh boot or a plain resource restart), the server console immediately logs three unhandled promise rejections from dist/game/server/server.js, right after "Started resource npwd":
(node:XXXX) ExperimentalWarning: localStorage is not available because --localstorage-file was not provided.
(Use `node --trace-warnings ...` to show where the warning was created)
[warn] [js] Unhandled promise rejection in resource npwd
[warn] [js] Uncaught Error: Driver not found.
dist/game/server/server.js(5138,130): getDriver
dist/game/server/server.js(5199,28):
node:internal/process/task_queues(104,5): processTicksAndRejections
[warn] [js] Unhandled promise rejection in resource npwd
[warn] [js] Uncaught Error: Driver not found.
dist/game/server/server.js(5138,130): getDriver
dist/game/server/server.js(5199,28):
node:internal/process/task_queues(104,5): processTicksAndRejections
[warn] [js] Unhandled promise rejection in resource npwd
[warn] [js] Uncaught Error: No available storage method found.
dist/game/server/server.js(5207,27):
node:internal/process/task_queues(104,5): processTicksAndRejections
It's non-fatal — npwd finishes starting fine and the phone works — but it's noisy on every boot/restart, and it's an unhandled rejection rather than something caught and logged cleanly.
What I've traced so far (server-side dist/game/server/server.js, so happy to share the exact bundle if useful):
localforage is bundled in, and as far as I can find, its only consumer anywhere in the file is @sentry/integrations's Offline plugin, constructed with localforage.createInstance({ name: "sentry/offlineEventStore" }). That plugin only gets wired up if Sentry.init() runs, which is itself gated by config.debug.sentryEnabled && process.env.NODE_ENV === "production".
- To test that theory, I set
sentryEnabled: false in config.json and restarted just the npwd resource. The exact same three errors still fired, byte-for-byte identical stack traces. So either something else in the bundle also reaches localforage, or there's a second sentryEnabled/debug config baked into the compiled output at build time that isn't actually being overridden by the runtime config.json — I did notice what looks like a duplicate debug: { ..., sentryEnabled: true } object elsewhere in the same bundle, separate from the one read from config.json, but wasn't able to confirm which one is actually live from static reading alone.
- Root cause either way looks like
localforage (a browser storage abstraction — IndexedDB/WebSQL/localStorage) ending up in a code path that executes in the server-side Node context, where none of its backends exist. Node's own experimental localStorage global (gated behind --localstorage-file) isn't something we can pass through, since this environment embeds Node directly via libnode inside the server binary rather than spawning a standalone node process that would read that flag.
Issue Reproduction
- Start (or
restart npwd) a standard FXServer running npwd with default/near-default config.json.
- Watch the server console right after
Started resource npwd.
- See the three unhandled promise rejections above.
Evidence
Environment this was observed on: FiveM for GTA V Enhanced (Gen9), CitizenFX early-access cfx-server.exe build, embedded libnode26.dll (Node 26), Qbox Project framework. Flagging the Enhanced/Node-26 detail specifically in case this doesn't reproduce on Legacy/older embedded Node versions — wasn't able to cross-check against Legacy in this session.
Development Issue
Unsure — not sure if this is tied to active WIP work on the phone or a genuine regression, reporting as observed.
Phone Version
3.15.1-beta.2(fromfxmanifest.lua)Issue Description
Every time
npwdstarts (fresh boot or a plain resource restart), the server console immediately logs three unhandled promise rejections fromdist/game/server/server.js, right after "Started resource npwd":It's non-fatal — npwd finishes starting fine and the phone works — but it's noisy on every boot/restart, and it's an unhandled rejection rather than something caught and logged cleanly.
What I've traced so far (server-side
dist/game/server/server.js, so happy to share the exact bundle if useful):localforageis bundled in, and as far as I can find, its only consumer anywhere in the file is@sentry/integrations'sOfflineplugin, constructed withlocalforage.createInstance({ name: "sentry/offlineEventStore" }). That plugin only gets wired up ifSentry.init()runs, which is itself gated byconfig.debug.sentryEnabled && process.env.NODE_ENV === "production".sentryEnabled: falseinconfig.jsonand restarted just thenpwdresource. The exact same three errors still fired, byte-for-byte identical stack traces. So either something else in the bundle also reacheslocalforage, or there's a secondsentryEnabled/debug config baked into the compiled output at build time that isn't actually being overridden by the runtimeconfig.json— I did notice what looks like a duplicatedebug: { ..., sentryEnabled: true }object elsewhere in the same bundle, separate from the one read fromconfig.json, but wasn't able to confirm which one is actually live from static reading alone.localforage(a browser storage abstraction — IndexedDB/WebSQL/localStorage) ending up in a code path that executes in the server-side Node context, where none of its backends exist. Node's own experimentallocalStorageglobal (gated behind--localstorage-file) isn't something we can pass through, since this environment embeds Node directly vialibnodeinside the server binary rather than spawning a standalonenodeprocess that would read that flag.Issue Reproduction
restart npwd) a standard FXServer runningnpwdwith default/near-defaultconfig.json.Started resource npwd.Evidence
Environment this was observed on: FiveM for GTA V Enhanced (Gen9), CitizenFX early-access
cfx-server.exebuild, embeddedlibnode26.dll(Node 26), Qbox Project framework. Flagging the Enhanced/Node-26 detail specifically in case this doesn't reproduce on Legacy/older embedded Node versions — wasn't able to cross-check against Legacy in this session.