cirosantilli / cirosantilli.github.io

Source for: https://cirosantilli.com and https://ourbigbook.com/cirosantilli Build HTML with https://github.com/ourbigbook/ourbigbook with "npm install && npx ourbigbook ." You can use this issue tracker for anything you want to tell me, even if it is not related to the repo. I also use this repo as generic issue tracker for myself.
https://cirosantilli.com
Creative Commons Attribution Share Alike 4.0 International
42 stars 9 forks source link

feathers-realworld-example-app fails with "error: NotAuthenticated: invalid signature when running local with vue.js" frontend #71

Closed cirosantilli closed 3 years ago

cirosantilli commented 3 years ago

They created a tracker: https://github.com/randyscotsmithey/feathers-realworld-example-app/issues/2

This will be moved to https://github.com/randyscotsmithey/feathers-realworld-example-app issues if they create the issue tracker there, already contacted repo owner.

I first managed to get a fully working vue-js Node.js Express setup as shown at: https://github.com/gothinkster/node-express-realworld-example-app/pull/116 which indicates that the Vue setup and my MongoDB are actually working.

So now I wanted to replace the Node.js Express backend with this FeathersJS backend at 8bc3a09242285de624c75bb8345630df499a7d07 and I ran it with:

MONGODB_FEATHERS_REALWORLD=mongodb://localhost:27017/feathers_realworld npm start

and patched the Vue frontend to point it to this server:

diff --git a/src/common/config.js b/src/common/config.js
index 03af84e..592a4fb 100644
--- a/src/common/config.js
+++ b/src/common/config.js
@@ -1,2 +1,2 @@
-export const API_URL = "https://conduit.productionready.io/api";
+export const API_URL = "http://localhost:3030/api";
 export default API_URL;

but then, when I visit the homepage at http://localhost:8080/ , the "Loading articles..." never disappears, indicating a problem, and on the server I see:

> real-world-feathers@0.0.0 start /home/ciro/git/feathers-realworld-example-app
> node src/

info: mongodb://localhost:27017/feathers_realworld
(node:222399) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:222399) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:222399) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:222399) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
info: Feathers application started on http://localhost:3030
error: NotAuthenticated: invalid signature
    at new NotAuthenticated (/home/ciro/git/feathers-realworld-example-app/node_modules/@feathersjs/errors/lib/index.js:93:17)
    at /home/ciro/git/feathers-realworld-example-app/node_modules/@feathersjs/authentication/lib/hooks/authenticate.js:87:31
error: NotAuthenticated: invalid signature
    at new NotAuthenticated (/home/ciro/git/feathers-realworld-example-app/node_modules/@feathersjs/errors/lib/index.js:93:17)
    at /home/ciro/git/feathers-realworld-example-app/node_modules/@feathersjs/authentication/lib/hooks/authenticate.js:87:31

Any clues?

cirosantilli commented 3 years ago

https://github.com/randyscotsmithey/feathers-realworld-example-app/issues/2