On parse deploy command I get this error, how can I solve it?
x509: failed to load system roots and no roots provided.
/home/travis/gopath/src/github.com/ParsePlatform/parse-cli/main.go:143 checkIfSupported
/home/travis/gopath/src/github.com/ParsePlatform/parse-cli/main.go:101 main
/home/travis/.gimme/versions/go1.4.2.linux.amd64/src/runtime/proc.go:72 main
/home/travis/.gimme/versions/go1.4.2.linux.amd64/src/runtime/asm_386.s:2288 goexit
(OS Ubuntu 14.04 LTS 64)
UPDATE
Now sometimes, one in ten attempts, it requests email and password. But, after input password, I get:
panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x1 pc=0x8097025]
I solved executing an update-ca-certificates command. I think that certificates were broken and it stopped to work, but I dont know why.
Related
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.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I get a Panic if I attempt to run the tests or runthe app directly via: go run main.go
The code works great on my old Macbook Pro. It panics on my new Macbook Pro.
I believe the error has Something to do with accessing the Firestore datastore but I'm not sure what's going wrong.
I'm running the same code so datastore Keys and everything else should be identical.
Here is the Github repo:
https://github.com/golangnewb/FirestoreTestHttp
Working Computer:
go version go1.11.2 darwin/amd64
Panic Computer:
go version go1.13.5 darwin/amd64
❯ go test
--- FAIL: TestCities (0.01s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x14d557a]
goroutine 6 [running]:
testing.tRunner.func1(0xc000312200)
/usr/local/go/src/testing/testing.go:874 +0x3a3
panic(0x15ac100, 0x1b3e740)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
cloud.google.com/go/firestore.(*Client).path(...)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:107
cloud.google.com/go/firestore.(*Client).Collection(0x0, 0x1677ac0, 0x6, 0x14)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:122 +0x9a
_/Users/XXX/Dropbox/go/src/firestoreTestHttp.addCitiesFirestore(0x5e4c4feb, 0xc000064760)
/Users/XXX/Dropbox/go/src/firestoreTestHttp/city_handlers_test.go:218 +0x13d
_/Users/XXX/Dropbox/go/src/firestoreTestHttp.TestCities(0xc000312200)
/Users/XXX/Dropbox/go/src/firestoreTestHttp/city_handlers_test.go:19 +0x26
testing.tRunner(0xc000312200, 0x16a1c98)
/usr/local/go/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:960 +0x350
exit status 2
FAIL _/Users/XXX/Dropbox/go/src/firestoreTestHttp 0.165s
Here is the panic if I try to run via:
❯ go run main.go
2020/02/18 17:19:39 http: panic serving [::1]:60479: runtime error: invalid memory address or nil pointer dereference
goroutine 9 [running]:
net/http.(*conn).serve.func1(0xc00027c6e0)
/usr/local/go/src/net/http/server.go:1767 +0x139
panic(0x15a69c0, 0x1b39a50)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
cloud.google.com/go/firestore.(*Client).path(...)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:107
cloud.google.com/go/firestore.(*Client).Collection(0x0, 0x16728ba, 0x6, 0x14)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:122 +0x9a
main.indexHandler(0x1744360, 0xc000322000, 0xc0002c8200)
/Users/XXX/Dropbox/go/src/firestoreTestHttp/main.go:50 +0xa2
net/http.HandlerFunc.ServeHTTP(0x169da80, 0x1744360, 0xc000322000, 0xc0002c8200)
/usr/local/go/src/net/http/server.go:2007 +0x44
net/http.(*ServeMux).ServeHTTP(0xc0002ea100, 0x1744360, 0xc000322000, 0xc0002c8200)
/usr/local/go/src/net/http/server.go:2387 +0x1bd
net/http.serverHandler.ServeHTTP(0xc000312000, 0x1744360, 0xc000322000, 0xc0002c8200)
/usr/local/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc00027c6e0, 0x17457a0, 0xc00008cf80)
/usr/local/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2928 +0x384
Although I dont feel well in Go I will try a shot. If I am wrong just let me know.
From the error it seems that Client is nil. In attached Git repo in main you are logging that it should be set as environment variable GCLOUD_PROJECT, however I haven't found any so.Getenv function that gets this value. Maybe this value is wrong...?
So I guess this statement client, _ := firestore.NewClient(ctx, projectID) is being called with wrong projectID. In the statement error handling is omitted, so we do not know if the client has been created properly. If it was not created, that we should get such error.
Maybe you should add error handling like in example in Go Firestore Reference, to ensure that there is no error during client creation.
I hope this will help you!
I intentionally broke my .config file which is responsible for connecting to kubernetes server by changing the content in the user section and I am getting this error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45756e]
goroutine 1 [running]:
k8s.io/client-go/kubernetes.NewForConfig(0x0, 0x0, 0xc42031c120, 0x1c)
/home/saivamsi/go/src/k8s.io/client-go/kubernetes/clientset.go:371 +0x4e
exit status 2
I was doing this to test what happens if somehow invalid config was supplied so I want to handle this error by retrying to connect to server for next 5sec to see if it. How can I achieve this?
I am using kubernetes go client with this code to make the connection:
var KubeConfigPath = os.Getenv("HOME") + "/.kube/config2"
var config, ConfigErr = clientcmd.BuildConfigFromFlags("", KubeConfigPath)
var clientset, ClientErr = kubernetes.NewForConfig(config)
You can likely avoid the segfault if you check that the error from BuildConfigFromFlags is not nil. If it is nil then sleep and retry, otherwise continue.
I have some code that can't be run under GDB because it's an embedded system. However, in the syslog I will occasionally see the following:
kernel: nam[13986]: segfault at b579000 ip b71737dc sp b5120c9c error 4 in libc-2.5.so[b7102000+13f000]
Is there some way to find where in the code this error occurred using the numbers listed in the error output above?
Yes, ip stands for "instruction pointer", and it's the location of the crash. In the quoted message, it's 0xb71737dc.
I am new to golang and currently following this tutorial and source code here - http://golang.org/doc/articles/wiki/part2.go
After building this file, I am getting
calvin$ ./mywebwiki2
2012/07/23 17:12:59 http: panic serving [::1]:58820: runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/pkg/net/http/server.go:576 (0x3f202)
_func_003: buf.Write(debug.Stack())
/private/tmp/bindist454984655/go/src/pkg/runtime/proc.c:1443 (0x10c79)
/private/tmp/bindist454984655/go/src/pkg/runtime/runtime.c:128 (0x11745)
/private/tmp/bindist454984655/go/src/pkg/runtime/thread_darwin.c:418 (0x148b5)
/Users/calvin/work/gowiki/mywebwiki2.go:33 (0x2248)
viewHandler: fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", p.Title, p.Body)
/usr/local/go/src/pkg/net/http/server.go:690 (0x331ae)
HandlerFunc.ServeHTTP: f(w, r)
/usr/local/go/src/pkg/net/http/server.go:926 (0x34030)
(*ServeMux).ServeHTTP: mux.handler(r).ServeHTTP(w, r)
/usr/local/go/src/pkg/net/http/server.go:656 (0x32fc1)
(*conn).serve: handler.ServeHTTP(w, w.req)
/private/tmp/bindist454984655/go/src/pkg/runtime/proc.c:271 (0xed7f)
2012/07/23 17:12:59 http: panic serving [::1]:58821: runtime error: invalid memory address or nil pointer dereference
Any idea what I did wrong to be causing this apparent memory corruption?
There's an ignored err at line 36. The error probably says open .txt: no such file or directory if you tested in browser using URL http://localhost:8080/view/ or open foo.txt: no such file or directory if you tested in browser using URL http://localhost:8080/view/foo. In the later case there must be a file "foo.txt" in your working directory for this example code to work. After that the code seems to work for me locally.
Someone should probably fill an issue about the ignored error value.
In the tutorial, you created the file TestPage previously. Which is the page you should be navigating to when you first build the server. In the tutorial, they have you navigate to view/test instead of view/TestPage as you should which is what creates the confusion.