beyondcode / herd-community

88 stars 1 forks source link

[Bug]: Dumps not showing on Windows #517

Closed jrd-lewis closed 7 months ago

jrd-lewis commented 7 months ago

Operating system version

Windows 11

System architecture

Intel (x86)

Herd Version

1.0.0

PHP Version

No response

Bug description

I pressed the antenna icon in the top of the Dumps window, and it didn't display my dump() call in either my browser or the Dumps winow.

Steps to reproduce

Example:

public function index(): View
    {
        $posts = Post::latest()->get();
        dump($posts);

        return view('blog.index', compact('posts'));
    }

Relevant log output

No response

mpociot commented 7 months ago

Can you try and restart your Herd services? In some cases it might be the issue that the php.ini file changes from us are not properly applied.

jrd-lewis commented 7 months ago

I had no change when I restarted from the GUI and tried again.

Though when I tried in PowerShell with herd restart, I did get PHP Fatal error: Uncaught TypeError: Valet\Herd::getBasePhpPort(): Return value must be of type int, string returned

mpociot commented 7 months ago

Is the Dump server running? You can see it in the Herd Dump settings. Maybe the port is taken? Does it make a difference if you just dump a simple string?

jrd-lewis commented 7 months ago

It looks to be running from netstat -a -n | find "9001":

  TCP    0.0.0.0:9001           0.0.0.0:0              LISTENING
  TCP    [::]:9001              [::]:0                 LISTENING

Calling dump on a string doesn't work either. And calling dd on either returns This page isn't working right now

rubendn commented 7 months ago

I'm having the same issue with Dumps on Windows 11.

When I click the antenna to turn off dumps, they do show on the page but with dumps turned on, they don't show on the page nor in Dumps.

This is what it shows when I run netstat:

 TCP    0.0.0.0:9001           0.0.0.0:0              LISTENING

 TCP    127.0.0.1:57437        127.0.0.1:9001         TIME_WAIT

 TCP    [::]:9001              [::]:0                 LISTENING

I also turned off Windows Firewall completely to test but that had no effect.

mpociot commented 7 months ago

Can you share a screenshot of the Dashboard? Are all services marked as running/green?

rubendn commented 7 months ago

Here is the screenshot:

Herd

It is intercepting the dumps when Dumps is turned on because they do not display in the browser and when I click Dumps Off they do show up in the browser.

rubendn commented 7 months ago

Update:

Works:

dump('This is the dump.');

Does Not Work:

dump($this->items);
mpociot commented 7 months ago

Okay, that's good to know. I'll check if there's an issue with the payload size and fix it in the next release.

jrd-lewis commented 7 months ago

Update:

Works:

dump('This is the dump.');

Does Not Work:

dump($this->items);

Interesting. I can't even get the "this is the dump" message to show up. It is intercepting it since it isn't in the browser; but it's not in the Dumps window.

@mpociot And this is my Dashboard screenshot:

image

rubendn commented 7 months ago

Note:

I changed the collection size from 20 to 1 and it works with both dump($this->items) and dd($this->items). dd does stop execution of the page (Not sure if that is the intended behavior).

IvanKovachev commented 7 months ago

I have the same issue - all services are in green, and Dumps are not shown in the viewer. They seem to be captured, though, because they are not visible in the browser when intercepting is on.

Doesn't work even with trying to dump a single character string.

AlexVanSteenhoven commented 7 months ago

@IvanKovachev I have exactly the same problem like you describe.

Every service is green and when I am intercepting the dd's nothing shows on the browser , only if I turn off intercepting dumps. Still not found a solution. Even tried to add a firewall rule for the port

mpociot commented 7 months ago

I assume all these issues are related to the payload size

jrd-lewis commented 7 months ago

I assume all these issues are related to the payload size

I haven't touched any of the default settings aside from installing PHP 8.2 as a secondary version. So, I don't know what it'd be related to.

mpociot commented 7 months ago

Yeah, it's something we need to fix on our side 👍

mpociot commented 7 months ago

Fixed in version 1.0.1 https://herd.laravel.com/changelog/windows#101

jrd-lewis commented 7 months ago

I just tested with 1.0.1 and it's still not showing up. It's definitely intercepting the dump calls, but it's not outputting them in the Dumps window.

mpociot commented 7 months ago

@jrd-lewis then it's not related to the payload size for you (like it was for others in this thread) Can you create a new issue so we can follow up there and identify what's going on?