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

Requests not shown #463

Closed
dimsav opened this issue Dec 2, 2018 · 22 comments
Closed

Requests not shown #463

dimsav opened this issue Dec 2, 2018 · 22 comments

Comments

@dimsav
Copy link

dimsav commented Dec 2, 2018

Hello,

we face an issue on our production server where the requests entries are not shown in the requests tab.

However, it seems in the database the requests are tracked normally.

Also, when viewing the api calls telescope does, we seem to get some results.

image 2018-12-02 at 02 16 45

Any idea what could I look into to check what is wrong?

Thanks!

@themsaid
Copy link
Member

themsaid commented Dec 3, 2018

Any errors in the browser console?

@dimsav
Copy link
Author

dimsav commented Dec 3, 2018

No errors, in the console.

image 2018-12-03 at 18 04 30

@Jimmy-JS
Copy link

Jimmy-JS commented Dec 4, 2018

I've got the same problem too. No error on console, Got the entries response from XHR request, but request not showing on web

@themsaid
Copy link
Member

themsaid commented Dec 4, 2018

I can't replicate the issue, entries seem to be working fine for me.

Is it only the requests screen or all other screens are empty even though they should have records?

@Jimmy-JS
Copy link

Jimmy-JS commented Dec 5, 2018

It's only in the request screen. on others like exception etc they show the entries on screen. here is the screenshot:
image

And the console is clean too.
image

And it show entries on other menu like exception:
image

@paras-malhotra
Copy link
Contributor

Can you try running php artisan telescope:publish?

@Jimmy-JS
Copy link

Jimmy-JS commented Dec 5, 2018

Yes, I'm already run telescope:publish artisan command

@themsaid
Copy link
Member

themsaid commented Dec 5, 2018

I can't think of an explanation of what you're seeing here and can't replicate it. You'll have to investigate it in your apps since you're the only ones who can replicate it.

@Mezzair
Copy link

Mezzair commented Dec 5, 2018

I've had this with two fresh installs today. Same outcome as those people reporting above.

Edit: It was to do with the filtering condition as described in @ryanmortier comments below.

@themsaid
Copy link
Member

themsaid commented Dec 5, 2018

@Mezzair fresh installs on a fresh laravel app works fine for me. Still can't replicate.

@themsaid
Copy link
Member

themsaid commented Dec 5, 2018

Check the Vue component in dev tools, the Root.Index.IndexScreen.entries property should contain some records.

@ryanmortier
Copy link

ryanmortier commented Dec 5, 2018

Same issue here.

I just deployed an application to production with Laravel Forge and telescope is enabled for production. The only page working for me is Schedule. I should be seeing things in Requests, Jobs, Commands, etc. but I'm not.

It worked great when it was running in dev on my Mac.

The Root.Index.IndexScreen.entries is an empty array.

laravel/telescope is in my require not require-dev. All assets published, installed correctly, etc.

edit: slightly different issue though as the entries are not in the database like the OP.

edit2: nevermind, #409 and #76 (comment) fixed my issue.

@paras-malhotra
Copy link
Contributor

paras-malhotra commented Dec 5, 2018

The documentation has been updated to explain filters: laravel/docs#4808. I think the majority of the issues are related to filtering in production. This issue, #470, #434, #409, #288, #134 and #76 are all related to the same issue.

@themsaid perhaps we should add a note in the README related to filters for use in production environment?

Having said that, I think the OP of this issue mentioned that entries are stored in requests but not displayed in the request tab. I don't think that issue is related to filters though.

@Jimmy-JS
Copy link

Jimmy-JS commented Dec 5, 2018

@paras-malhotra I think my problem is not in filtering issue. since I already return true inside telescope filter function. and I get request entries on my database (telescope_entries table). and even in network is showing the entries but in vue Root.Index.IndexScreen.entries is just empty array not binded from the XHR Request

@paras-malhotra
Copy link
Contributor

@Jimmy-JS yes I understand. Can you add breakpoints on line 118 and 96 of IndexScreen.vue and see what's going on with the entries variable and where this.entries is initialized?

@dimsav
Copy link
Author

dimsav commented Dec 5, 2018

Maybe this will help reproduce the problem.

I had the following filter set on production, and this is when the problem started.

Telescope::filter(function (IncomingEntry $entry) {
            if (true || $this->app->isLocal()) {
                return true;
            }
});

1.7 Million entries where saved on the telescope_entries table. Only after importing the production db locally, the problem was reproduced on the local environment.

@themsaid
Copy link
Member

themsaid commented Dec 6, 2018

Let's stay focused here please.

This is issue that records exist in the database, they are returned in the XHR request but they don't appear in the UI.

@Jimmy-JS and @dimsav please check Vue dev tools and see the value of Root.Index.IndexScreen.entries, is this property empty?

@Jimmy-JS
Copy link

Jimmy-JS commented Dec 6, 2018

@themsaid yup it's empty although it was getting entries from XHR request. Here is the screenshot:

In Vue Dev Tools:
screenshot 2018-12-06 at 17 18 02

In Network:
screenshot 2018-12-06 at 17 20 09

@nakonechny
Copy link

Got the same problem. Requests totally not shown since one heavy request been recorded. Telescope:clear did help but only until that request been recorded again.

Finally I have found out that request's json exceeded the content field capacity. Being 'text' it only can store up to 64KB of data.

Altering it to LONGTEXT and telescope:clear fixed the issue.

@themsaid
Copy link
Member

themsaid commented Dec 6, 2018

I think this can only be fixed by someone who can replicate it. I'll keep the issue open but I really can't think of why it's acting like this with some people and not others.

@nakonechny
Copy link

nakonechny commented Dec 6, 2018

someone who can replicate it.

Everyone. You just insert into telescope_entries with truncated json content (invalid). Then this record gets rejected by DatabaseEntriesRepository::get() line 83. And then 'entries' section of response contains array with keys starting not from 0, but 1 or other number instead. As a result UI completely rejects to display any request from given array. It shows 'just empty space' message.

@themsaid
Copy link
Member

themsaid commented Dec 7, 2018

fixed that in 364c09f

Thanks @nakonechny for the explanation :)

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

No branches or pull requests

7 participants