*Thanks for reverting back. I solved that by reinstalling go-ipfs*

On Tue, Sep 18, 2018 at 12:38 PM Agniva De Sarker <
agniva.quicksil...@gmail.com> wrote:

> You have to check the Send() method on RequestBuilder and find out where
> the nil pointer is coming from.
>
> There are no repro steps, nor the full stack trace, nor enough code for us
> to understand what is really happening. Without that it is hard to conclude
> why it is working on windows and not on ubuntu.
>
> Your code doesn't include that library at all. And we don't know which
> request is causing the crash.
>
> -Agniva
>
> On Tuesday, 18 September 2018 10:22:39 UTC+5:30, akshita babel wrote:
>>
>> But this is code is perfectly working in windows and when i am trying to
>> run this on ubuntu it is giving the above error.
>>
>> On Tue, Sep 18, 2018 at 12:22 AM Justin Israel <justin...@gmail.com>
>> wrote:
>>
>>> Your stack trace isn't long enough to see the usage of ipfs leading up
>>> to the crash. And your example code doesn't show usage of that library.
>>> Somewhere in there you must have a nil pointer to a RequestBuilder, on
>>> which Send() is being called.
>>>
>>> On Tue, Sep 18, 2018, 3:42 AM akshita babel <akshitab...@gmail.com>
>>> wrote:
>>>
>>>> When I am running a program which is for a web response I am getting a
>>>> run time error as follows:
>>>> http: panic serving 127.0.0.1:43802: runtime error: invalid memory
>>>> address or nil pointer dereference
>>>> goroutine 6 [running]:
>>>> net/http.(*conn).serve.func1(0xc4200a4a00)
>>>> /usr/lib/go-1.10/src/net/http/server.go:1726 +0x11b
>>>> panic(0x9b5360, 0xd99230)
>>>> /usr/lib/go-1.10/src/runtime/panic.go:502 +0x24a
>>>> github.com/ipfs/go-ipfs-api.(*RequestBuilder).Send(0xc4201740a0,
>>>> 0xb95c60, 0xc420022100, 0x0, 0x0, 0x0)
>>>> The code of main file is as follows:
>>>> func main() {
>>>>
>>>> router := httprouter.New()
>>>> router.RedirectTrailingSlash = true
>>>> c := cors.New(cors.Options{
>>>>    AllowedOrigins:   []string{"*"},
>>>>    AllowedMethods:   []string{"GET", "POST", "OPTIONS", "Authorization"},
>>>>    AllowedHeaders:   []string{"*"},
>>>>    AllowCredentials: true,
>>>> })
>>>> router.GET("/create", StoreAndGetHash)
>>>> router.GET("/read/:hashvalue", GetFile)
>>>> router.GET("/appdata/:appID", ReadPeer)
>>>> router.GET("/update", UpdateAndGetHash)
>>>> router.GET("/createdir", GetDir)
>>>> router.GET("/newkey", GetNewKey)
>>>>
>>>> log.Fatal(http.ListenAndServe(":3000", c.Handler(router)))
>>>>
>>>> }
>>>>
>>>> I am working on ubuntu
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "golang-nuts" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to golang-nuts...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to