Closed adamtester closed 9 years ago
I can see that you are using the Laravel Debugbar package. I will try to install it and investigate the issue myself.
Best,
Ron.
Looking through the stack trace it seems to come from the debugbar, I will have a play when I finish work and see what I can find.
Adam
Ok commenting out 'Barryvdh\Debugbar\ServiceProvider'
in config/app.php
solves the problem so it is an issue with that package, so I'll just have to do without, think I should open an issue over there?
Adam
I am not sure that the issue is related to the Debugbar package, but to the lack of support of some PHP functionality it uses by GAE.
This is not the first one and I suppose not the last one.
The latest one was about fopen()
function while using it on GCS buckets, it turns out that
'a' (append) mode is not supported on GCS buckets. The good news is that in most cases
things work Ok.
I am going to try to reproduce the issue and find whatever is causing it. Then I might either add the missing feature to the GaeSupport package or submit a pull request to Debugbar.
Please keep me posted on your progress.
Thanks,
Ron.
I did some digging and it turns out that it is possible to make it work without any pull requests. For now I suggest to use the following service provider I wrote for the task:
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
use Symfony\Component\VarDumper\Dumper\CliDumper;
/**
* Class LineDumperServiceProvider
*
* Replaces the default output stream of Symfony's
* CliDumper and HtmlDumper classes in order to
* be able to run on Google App Engine.
*
* 'php://stdout' is used by CliDumper,
* 'php://output' is used by HtmlDumper,
* both are not supported on GAE.
*
* @package App\Providers
*/
class LineDumperServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
HtmlDumper::$defaultOutput =
CliDumper::$defaultOutput =
function($line, $depth, $indentPad)
{
if (-1 !== $depth)
{
echo str_repeat($indentPad, $depth).$line."\n";
}
};
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
Please create 'LineDumperServiceProvider.php' in your 'app/Providers' folder and register the provider before anything else using Symfony's Dumpers, including 'Barryvdh\Debugbar\ServiceProvider', in your 'config/app.php':
'providers' => [
'App\Providers\LineDumperServiceProvider',
];
Later on I'm planning on adding this provider to my GaeSupportL5 package.
Best,
Ron.
Nice one! I'll give it a test on my gae app tonight.
Adam
Ok I've been using your code last night and this morning and seems to have no issues! I'll let you know if I run into anything, thanks so much for this!
The latest stable release 1.1 includes support for Symfony's dumpers.
Hello, I was facing same issue in GAE. I changed php://stdout to php://temp and it worked.
I seem to be getting this ErrorException, I believe its actually an error writing the error message, but I've used syslog as the command generated. Does anyone know what causes it?