Closed christian-geier closed 1 year ago
You are getting this error because the email address you entered in the login screen has not been added as a user in your NOSH3. Make sure the first time you enter NOSH3 is the same email that you entered during the installation script (the one in the .env file) if you followed the instructions in the README. To add additional users, you'll need to click on the 3 dots on the upper right, select Users and Add Users. Make sure that the user is also toggled as active (not by default).
I have confirmed that it is the same email address in the login screen and the .env file but still get this error :/ any other idea?
Try logging in and please share what console shows in the browser. I updated the code to debug where the problem might be coming from. You can check docker image ls to confirm that the NOSH docker image (shihjay2/nosh3) has updated recently. Image ID 5f89232df03c.
Thanks, here is the console output
registerServiceWorker.js:8 App is being served from cache by a service worker.
For more details, visit https://goo.gl/AFskqB
registerServiceWorker.js:14 Service worker has been registered.
xhr.js:220 POST https://noshdemo.com/auth/authenticate 401
(anonymous) @ xhr.js:220
e.exports @ xhr.js:16
e.exports @ dispatchRequest.js:58
h.request @ Axios.js:109
(anonymous) @ Axios.js:144
(anonymous) @ bind.js:9
_ @ LoginView.vue:251
h @ LoginView.vue:365
await in h (async)
(anonymous) @ vee-validate.esm.js:2113
Promise.then (async)
(anonymous) @ vee-validate.esm.js:2105
l @ runtime-core.esm-bundler.js:173
c @ runtime-core.esm-bundler.js:182
n @ runtime-dom.esm-bundler.js:345
LoginView.vue:255 r {message: 'Request failed with status code 401', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}code: "ERR_BAD_REQUEST"config: {transitional: {…}, transformRequest: Array(1), transformResponse: Array(1), timeout: 0, adapter: ƒ, …}message: "Request failed with status code 401"name: "AxiosError"request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}response: {data: 'Unauthorized - User not found', status: 401, statusText: '', headers: {…}, config: {…}, …}[[Prototype]]: Error
The resource as
value and it is preloaded intentionally.
The resource as
value and it is preloaded intentionally.
The resource as
value and it is preloaded intentionally.
The resource as
value and it is preloaded intentionally.
The resource as
value and it is preloaded intentionally.
The resource as
value and it is preloaded intentionally.
The error indicates that in the users database, there is no user with your email that is set. Unless you changed the .env file AFTER you installed it the first time, this should technically not have happened. When you use the /start login, it automatically detects if the users database is empty and if so, it installs the first user email that is listed in your .env file. You'll need to inspect your database and find out what has populated your users database the first time to log in. Go to https://db.noshdemo.com/_utils/#login and authenticate using the credentials you saved in env (COUCHDB_USER, COUCHDB_PASSWORD). Go to the users (not _users) database and there should be at least 1 entry and open it and see what email value is set. That's the email to use and should not result in an error when you log in via Magic.
Hi thanks for the new instructions. I checked the link and the users DB is empty, so something did not work with, even after visiting the /start link. Can you recommend another work around ? Really interested in trying out the software.
From Fauxton (screenshot you shared), delete the Users database. Then run /start again.
Hey thanks - deleted the users data base, went to noshdemo.com/start and got redirected to https://noshdemo.com/app/login . so far so good - unfortunately the users DB did not get restored as per Fauxton so login still does not work
From Fauxton - delete all databases (including _users) and then run /start again.
OK done, I first got : "Bad gateway"; After a refresh of /start the login page forwards/loads fine In Fauxton, DB users is still empty
I updated the code and there should be a new Docker Image. Make sure you have your system updated and use go to https://noshdemo.com/useraddtest and report the output.
I get alternating "Bad Gateway" and "404 Page not found"
Can you confirm your Docker image ID for shihjay2/nosh3 is e1bb7396eb0a (latest)?
hmm I see multiple nosh3 entries, I believe I am running 2f8b4d0c9ea1 because it is tagged "latest" ?!
root@v7354:~# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
shihjay2/nosh3 latest 2f8b4d0c9ea1 5 hours ago 254MB
shihjay2/nosh3
That is correct (latest) - there has been a few new commits since my last post. Are you able to show the docker log for nosh3 when you make the call for for /useraddtest when you get the Bad Gateway error?
docker logs $(docker ps -aqf "name=^nosh$") -f listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET /start 302 104 - 177.476 ms GET /app/login 304 - - 7.609 ms GET /app/js/chunk-vendors.e31aeaa9.js 304 - - 1.115 ms GET /auth/config 304 - - 6.047 ms GET /app/img/icons/android-chrome-192x192.png 304 - - 0.926 ms GET /app/service-worker.js 304 - - 1.541 ms GET /app/workbox-5b385ed2.js 304 - - 0.907 ms
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET / 404 139 - 9.440 ms GET / 404 139 - 2.712 ms GET / 404 139 - 0.925 ms GET / 404 139 - 1.136 ms GET / 404 139 - 0.920 ms GET / 404 139 - 1.073 ms GET / 404 139 - 0.981 ms GET / 404 139 - 0.693 ms GET / 404 139 - 1.148 ms GET / 404 139 - 1.378 ms GET / 404 139 - 0.890 ms
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET /addusertest 404 150 - 8.653 ms
Your last call shows /addusertest - it should be /useraddtest; please share the log again after making this updated call.
Ah OK, I now used /useraddtest - sorry!
That's the output. The error message comes first, and it shows listening on 4000. When I call /useraddtest I get "bad gateway" and there is no more output
~/nosh# root@v7354:~/nosh# docker logs $(docker ps -aqf "name=^nosh$") -f listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET /start 302 104 - 177.476 ms GET /app/login 304 - - 7.609 ms GET /app/js/chunk-vendors.e31aeaa9.js 304 - - 1.115 ms GET /auth/config 304 - - 6.047 ms GET /app/img/icons/android-chrome-192x192.png 304 - - 0.926 ms GET /app/service-worker.js 304 - - 1.541 ms GET /app/workbox-5b385ed2.js 304 - - 0.907 ms
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET / 404 139 - 9.440 ms GET / 404 139 - 2.712 ms GET / 404 139 - 0.925 ms GET / 404 139 - 1.136 ms GET / 404 139 - 0.920 ms GET / 404 139 - 1.073 ms GET / 404 139 - 0.981 ms GET / 404 139 - 0.693 ms GET / 404 139 - 1.148 ms GET / 404 139 - 1.378 ms GET / 404 139 - 0.890 ms
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET /addusertest 404 150 - 8.653 ms
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0
In the root folder where docker-compose.yml is located, shut down the docker compose containers with docker compose down
. Then wipe the entire couchdb configs and databases to completely start over. rm -rf dbconfig; rm -rf dbdata
. Then do docker compose up -d
. Then go back to the browser and run https://noshdemo.com/start and report back.
done... new output:
docker logs $(docker ps -aqf "name=^nosh$") -f listening on 4000 PouchDB sync complete for DB: activities
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0 listening on 4000 GET /start 302 104 - 186.033 ms GET /app/login 304 - - 13.912 ms GET /app/js/chunk-vendors.e31aeaa9.js 304 - - 1.270 ms GET /auth/config 304 - - 5.749 ms GET /app/img/icons/android-chrome-192x192.png 304 - - 2.407 ms GET /app/img/icons/favicon.svg 200 818 - 5.965 ms GET /app/service-worker.js 304 - - 1.744 ms GET /app/workbox-5b385ed2.js 304 - - 0.926 ms GET / 404 139 - 6.065 ms HEAD /start 302 52 - 49.246 ms HEAD /app/login 200 1551 - 2.421 ms
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise /);
^
Error
at new CustomPouchError (/usr/src/app/node_modules/pouchdb/lib/index.js:656:21)
at createError (/usr/src/app/node_modules/pouchdb/lib/index.js:665:10)
at invalidIdError (/usr/src/app/node_modules/pouchdb/lib/index.js:790:11)
at PouchDB.
Node.js v19.9.0
there's progress.
Magic login still gives trouble, now returns:
Error connecting to Magic! Please try again later!
I again checked the console, it shows Error: Unable to refresh user session. Please log in using the magic link flow to enable session persistence.
That's the full console output:
registerServiceWorker.js:14 Service worker has been registered. registerServiceWorker.js:20 New content is downloading. auth.magic.link/v1/session/refresh:1 Failed to load resource: the server responded with a status of 400 () app.chunk~store.f40a23723e1568aefcb1.js:1 could not authenticate via cookie Error: Unable to refresh user session. Please log in using the magic link flow to enable session persistence. at c (app.chunk~fad58de7366495db4650cfefac2fcd61.5d019ec66b2743aa5d65.js:1:701335) at Object.errorTransform (app.chunk~services.a1905df287aca27e0fda.js:1:13731) at app.chunk~fad58de7366495db4650cfefac2fcd61.5d019ec66b2743aa5d65.js:1:703498 (anonymous) @ app.chunk~store.f40a23723e1568aefcb1.js:1 runtime-core.esm-bundler.js:226 Error: Magic RPC Error: [-32603] Internal error: User denied account access. at index.mjs:5:3484 h @ runtime-core.esm-bundler.js:226 The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally. registerServiceWorker.js:17 Content has been cached for offline use. registerServiceWorker.js:8 App is being served from cache by a service worker. For more details, visit https://goo.gl/AFskqB app.chunk~vendor~fad58de7366495db4650cfefac2fcd61.0dffee05b1912d2db1f4.js:2 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://browser-http-intake.logs.datadoghq.com/v1/input/pub6e83b9e7b97e8037f6e1ab083d997dde?ddsource=browser&ddtags=sdk_version%3A3.10.0%2Cenv%3Aprod%2Cservice%3Aauth-prod with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details. e.send @ app.chunk~vendor~fad58de7366495db4650cfefac2fcd61.0dffee05b1912d2db1f4.js:2 e.flush @ app.chunk~vendor~fad58de7366495db4650cfefac2fcd61.0dffee05b1912d2db1f4.js:2 (anonymous) @ app.chunk~vendor~fad58de7366495db4650cfefac2fcd61.0dffee05b1912d2db1f4.js:2 Ze @ app.chunk~vendor~fad58de7366495db4650cfefac2fcd61.0dffee05b1912d2db1f4.js:2 (anonymous) @ app.chunk~vendor~fad58de7366495db4650cfefac2fcd61.0dffee05b1912d2db1f4.js:2
Hi, after setting up a completely new Magic account/API key I can get to the following screen:
I cannot get past it, but I believe this issue is fixed so will open a separate thread
Hi, I'm trying to set up NOSH3 and I am getting an authentication error with Magic. The Magic authentication appears to work (sends a 3 digit token to my email) but when I enter this the login page then throws: "Unauthorized access" and I remain stuck at the login screen.
How can I fix this?
docker-compose.yml:
.env
docker logs $(docker ps -aqf "name=^nosh$") -f
docker logs $(docker ps -aqf "name=^router$") -f
time="2023-06-19T15:41:55Z" level=info msg="Configuration loaded from flags."
docker logs $(docker ps -aqf "name=^couchdb$") -f