Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't expose endpoint feathers-debugger #2

Open
matiaslopezd opened this issue Aug 18, 2020 · 5 comments
Open

Can't expose endpoint feathers-debugger #2

matiaslopezd opened this issue Aug 18, 2020 · 5 comments

Comments

@matiaslopezd
Copy link

Hi, excellent debugger!!

I'm trying to use it but can't 😭, when try refresh directly from extension feathers debugger returns the error:

error: Page not found {"type":"FeathersError","name":"NotFound","code":404,"className":"not-found","data":{"url":"/feathers-debugger?$sort[ts]=1&$limit=500&ts[$gt]=1597784909432&$version=1.2.0"},"errors":{}}

I added to app.js

if (process.env.NODE_ENV === 'debug') app.configure(debuggerService());

And in app.hooks.js

const { trace } = require('feathers-debugger-service');

module.exports = {
  before: {
    all: [trace(), ...]
  },
  after: {
    all: [..., trace()]
  }
}

What I'm doing wrong? I have a custom socket file that is to say I'm not using channels.js, that can affect?

@radenkovic
Copy link
Collaborator

radenkovic commented Aug 19, 2020

Hey, @matiaslopezd I am not sure what it is the problem, but I need to mention in docs that it relies on REST. So if REST is not exposed then it won't work

app.configure(express.rest());

Do you have this line in app.js? Also, try changing the order of app.configure(), put it at the very end but before those lines:

app.use(express.notFound());
app.use(express.errorHandler({ logger }));

Please keep me posted! I can add websocket support in next version!

@matiaslopezd
Copy link
Author

Hi @radenkovic ! I'm tried again but nothing. :(

@radenkovic
Copy link
Collaborator

radenkovic commented Aug 28, 2020

@matiaslopezd I am pushing new version soon!

Can you check process.env.NODE_ENV === 'debug', just

console.log(process.env.NODE_ENV)

in app.js.

@matiaslopezd
Copy link
Author

Now it's working! But I don't know it's a bug or not but when receiving a new request is showed in extension but after ~5s disappear all. The same happens when observer mode is deactivated and you refresh manually all disappear.

Also sometimes the observer mode is not working and needs refresh manually.

2020-09-03 11-48-50

I'm using Google Chrome 85.0.4183.83 on Ubuntu 20.04.

@radenkovic Awesome tool!! 🚀

@radenkovic
Copy link
Collaborator

radenkovic commented Sep 3, 2020

@matiaslopezd I will take a look! to me it def looks like bug (like timeframe is very short), but will check what's going on. Anyways, glad to see that it's working!

extension but after ~5s disappear all

Do you have nodemon maybe? If server is restarted it cleans up the stored data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants