When I called log.Infof() from google.golang.org/appengine/log, Logging output "/logservice.Flush is not registered" - go

When I tried to output the log using google.golang.org/appengine/log, I got the following error in logging.
internal.flushLog: Flush RPC: Call error 1: call /logservice.Flush is not registered
Anyone know how to resolve this?
GAE/Go 1.16

You have to use google.golang.org/appengine/v2 for Go 1.12 or later.
See here.

Related

chromedp fails to start a new instance of chrome

Hey guys I have been trying to automate a task on my browser's machine using chromedp.
I tried examples on the repo however they always fail:
unexpected fault address 0x7f7a36461000 fatal error: fault [signal SIGBUS: bus error code=0x2 addr=0x7f7a36461000 pc=0x53a9d5]
Example's source code am running can be found here.
As I understand chromedp comes with headless pre-compiled version of chrome. I have browsed the API documentation to see if it possible to pass a port on which the dev tools is listening, no success.
However when I tried mafredri/cdp it worked. I came to understand that chromedp is failing to start its embedded chrome. Although, I am not really sure. Why is this happening?
My env:
Google Chrome 85.0.4183.102
Ubuntu 18.04.4 LTS
go version go1.13.5 linux/amd64
Any help would be truly appreciated.
So, long story short I went to run tests on the chromedp locally installed library through go test, it failed. I opened an issue on the Github repo. While it was not indicated that it requires Go 1.14+ but it does.
If you encountered this issue, please proceed to first run the tests on the master branch locally installed library. If it is fails with the following log:
github.com/chromedp/chromedp [github.com/chromedp/chromedp.test]
./chromedp_test.go:862:3: t.Cleanup undefined (type *testing.T has no
field or method Cleanup) ./chromedp_test.go:948:5: t.Cleanup undefined
(type *testing.T has no field or method Cleanup)
./chromedp_test.go:950:5: t.Cleanup undefined (type *testing.T has no
field or method Cleanup) FAIL github.com/chromedp/chromedp [build
failed]
You need to know that t.Cleanup was added on Go 1.14 (credits to Oiyoo).
I hope this helps you if you are having the same problem.

Error: command "bash" failed with no error message?

I am using terraform on my Mac system, and terraform apply results with below error
Error: command "bash" failed with no error message
on ssm.tf line 7, in data "external" "ssm-dynamic-general":
7: data "external" "ssm-dynamic-general" {
However there is nothing wrong in ssm.tf file, same runs perfectly fine in my another system.
Can some one please let me know what i am missing here?
You might have done what I accidentally did: not follow the external program protocol:
https://www.terraform.io/docs/providers/external/data_source.html#external-program-protocol
In my particular case, I failed to send the errors that were coming from my program to standard error. Instead, those errors were going to standard out.
That's why Terraform wasn't able to report on those errors.
So if you send any and all errors from your program to standard error using > &2, you should be able to see those errors when you run terraform plan.

VIM-Go Debugger on Windows results in "Goroutine not found"

I am setting up a vim-go environment on Windows, which is working for the most part. The one thing I cannot get to work is the debugger. I start it with :GoDebugStart. This already leads to a lot of errors regarding the debug layer=rpc.
Then I get more rpc related errors when trying to create the breakpoint. At the end when starting to debug with :GoDebugNext it complains about Goroutine not found. Does anybody have any similar issues or has an idea what this could be or what is missing?
Thanks!
Here is some of the error output:
ERR: 2019-09-24T16:43:37+02:00 info layer=debugger launching process with args: [C:\Users\henri\AppData\Local\Temp\VIA7813.tmp]
ERR: 2019-09-24T16:43:53+02:00 debug layer=rpc <- RPCServer.CreateBreakpoint(rpc2.CreateBreakpointIn{"Breakpoint":{"id":0,"name":"","addr":0,"file":"C:/Users/henri/go/src/local/flightGenerator/readAirports.go","line":38,"Cond":"","continue":false,"traceReturn":false,"goroutine":false,"stacktrace":0,"LoadArgs":null,"LoadLocals":null,"hitCount":null,"totalHitCount":0}})
ERR: 2019-09-24T16:43:53+02:00 info layer=debugger created breakpoint: &api.Breakpoint{ID:1, Name:"", Addr:0x4d179f, File:"C:/Users/henri/go/src/local/flightGenerator/readAirports.go", Line:38, FunctionName:"main.main", Cond:"", Tracepoint:false, TraceReturn:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
ERR: 2019-09-24T16:43:53+02:00 debug layer=rpc -> *rpc2.CreateBreakpointOut{"Breakpoint":{"id":1,"name":"","addr":5052319,"file":"C:/Users/hen
Also, after starting the debugging process with :GoDebugNext I get error stating that:
current goroutine not found...
vim-go: dictionary required
This seems to be a bug and I filed it as bug #2511 with the developer on github. Just in case somebody else has this problem.
I am reading here Request: option to suppress delve debugging logs
They are not errors, they're just the diagnostics that delve sends on
stderr , hence ERR. You're free to ignore them.

Where is the laravel error file located? or Is there a default error log in Laravel?

I'm working on a medium project -with laravel- for quite a long time now and of course I use the debugger of the framework -laravel-, but now from time to time I see the page of error but there is just "whoops something went wrong without" without any specifications for the error, and I see it a lot in ajax requests, but I just actualize the page and its gone!;
Finally the error show up again and I could see it in my terminal with the command tail down here
this is what I got
[2016-12-28 14:54:04] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\shop\tess\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php:45
Stack trace:
#0 D:\shop\tess\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php(25): Illuminate\Encryption\EncryptionServiceProvider->getEncrypterForKeyAndCipher(NULL, 'AES-256-CBC')
#1 D:\shop\tess\vendor\laravel\framework\src\Illuminate\Container\Container.php(731): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
I've found this on github it helped https://github.com/orchestral/testbench/issues/93
Make sure APP_DEBUG is set to true in your .env file
You can check the errors with the following command tail -f storage/logs/laravel.log Could be different errors

MAC go get github.com/go-gl/gl

On MAC i am trying to setup GO-GL, but when i run
go get github.com/go-gl/gl
I get the following error:
In file included from src/github.com/go-gl/gl/attriblocation.go:7:./gl.h:2:10: fatal error: 'GL/glew.h' file not found
Someone please help me figure this out!
Unless you have a good reason not to, you should use go-gl/glow package instead of go-gl/gl. It will provide you and your users with a better experience.
https://github.com/go-gl/glow#glow

Resources