Skip to content

panic: runtime error: invalid memory address or nil pointer dereference #130

@hardrock63

Description

@hardrock63

Hi,
I'm running the latest ufficial HA release on my Raspberry Pi5 8GB. Following the instractions of "Paraphraser" part 2 of his gist I'm now able to login to iSolarcloud.
But now I have this error:
Token: 678323_c22f87fb528a4490a3f04f7e0ed76666
Token File: /data/.GoSungrow/AppService_login.json
[12:05:04] INFO: Syncing data from gateway https://gateway.isolarcloud.eu ...
2025/05/26 12:05:04 INFO: Connecting to MQTT HASSIO Service...
2025/05/26 12:05:04 INFO: Connecting to SunGrow...
2025/05/26 12:05:05 INFO: Found SunGrow 3 devices
2025/05/26 12:05:05 INFO: Caching Sungrow metadata...
2025/05/26 12:05:05 INFO: Cached 529 Sungrow data points...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xc8 pc=0x44c484]
goroutine 1 [running]:
github.com/MickMake/GoSungrow/iSolarCloud/AppService/queryDeviceList.(*EndPoint).SetBatteryPoints(, {{, , }}, {0x400054a2a0, {0x4000623887, 0x7}, {0xc205341c8613483a, 0x495a4038, 0x43df280}, ...})
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/AppService/queryDeviceList/data.go:336 +0x3c4
github.com/MickMake/GoSungrow/iSolarCloud/AppService/queryDeviceList.(*EndPoint).GetEnergyStorageSystem(
, {0x400054a2a0, {0x4000623887, 0x7}, {0xc205341c8613483a, 0x495a4038, 0x43df280}, {{0x40003f60e0, 0x2, 0x2}}, ...})
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/AppService/queryDeviceList/data.go:298 +0x2b0
github.com/MickMake/GoSungrow/iSolarCloud/AppService/queryDeviceList.(*EndPoint).GetData(
)
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/AppService/queryDeviceList/data.go:259 +0x94
github.com/MickMake/GoSungrow/iSolarCloud/AppService/queryDeviceList.EndPoint.GetEndPointData(...)
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/AppService/queryDeviceList/struct.go:367
github.com/MickMake/GoSungrow/iSolarCloud.(*SunGrowData).CallEndpoint(, {, _}, {{0x400054a360, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...})
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/data.go:160 +0x344
github.com/MickMake/GoSungrow/iSolarCloud.(*SunGrowData).getDataSinglePsIdRequired(0x4000b2b450, {0x27b3368, 0x400045b500})
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/data.go:283 +0x254
github.com/MickMake/GoSungrow/iSolarCloud.(*SunGrowData).GetDataSingle(0x4000b2b450, {0x4000646970, 0xf})
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/data.go:238 +0x128
github.com/MickMake/GoSungrow/iSolarCloud.(*SunGrowData).GetData(0x4000b2b450)
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/iSolarCloud/data.go:209 +0x134
github.com/MickMake/GoSungrow/cmd.(*CmdMqtt).Cron(0x40000b2840)
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/cmd/cmd_mqtt.go:375 +0x204
github.com/MickMake/GoSungrow/cmd.(*CmdMqtt).CmdMqttRun(0x40000b2840, 0x0?, {0x0?, 0x0?, 0x0?})
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/cmd/cmd_mqtt.go:273 +0x70
github.com/spf13/cobra.(*Command).execute(0x40001a1b00, {0x400003a1a0, 0x0, 0x0})
/Volumes/home/mick/go/pkg/mod/github.com/spf13/[email protected]/command.go:940 +0x5e0
github.com/spf13/cobra.(*Command).ExecuteC(0x4000026000)
/Volumes/home/mick/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x368
github.com/spf13/cobra.(*Command).Execute(...)
/Volumes/home/mick/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/MickMake/GoUnify/Unify.(*Commands).Execute(...)
/Volumes/home/mick/Documents/GoLang/GoUnify/Unify/struct.go:277
github.com/MickMake/GoUnify/Unify.(*Unify).Execute(0x4000142500)
/Volumes/home/mick/Documents/GoLang/GoUnify/Unify/struct.go:216 +0x32c
github.com/MickMake/GoSungrow/cmd.Execute(...)
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/cmd/commands.go:94
main.main()
/Volumes/home/mick/Documents/GoLang/Solar/GoSungrow/main.go:11 +0x6c
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions