[GH-ISSUE #4240] Building iOS Framework Fails - functions and methods must return either zero or one values, and optionally an error #3340

Closed
opened 2026-05-05 14:09:20 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @AMELkhdfjd on GitHub (May 24, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4240

Bug Description

Running gomobile bind -target ios generates following error:

functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one value, and optionally an error: StatusExporter.GetProxyStatus
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one value, and optionally an error: Collector.ClearOfflineProxies
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
functions and methods must return either zero or one values, and optionally an error
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10066f7c4]

goroutine 1 [running]:
golang.org/x/mobile/bind.(*funcSummary).asMethod(0x0, 0x14018f7d7d8)
        /Users/mel337zoti1820/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240520174638-fa72addaaa1b/bind/genobjc.go:558 +0x24
golang.org/x/mobile/bind.(*ObjcGen).genStructH(0x14018f7d7d8, 0x14007d44eb0, 0x1401b0ad020)
        /Users/mel337zoti1820/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240520174638-fa72addaaa1b/bind/genobjc.go:1141 +0xb0c
golang.org/x/mobile/bind.(*ObjcGen).GenH(0x14018f7d7d8)

frpc Version

0.58.0

frps Version

0.58.0

System Architecture

Mac14,2

Configurations

Mac14,2

Logs

No response

Steps to reproduce

command executed:

gomobile bind -target=ios github.com/fatedier/frp/client github.com/fatedier/frp/client/event github.com/fatedier/frp/client/health github.com/fatedier/frp/client/proxy github.com/fatedier/frp/client/visitor github.com/fatedier/frp/cmd/frpc/sub github.com/fatedier/frp/pkg/auth/legacy  github.com/fatedier/frp/pkg/auth github.com/fatedier/frp/pkg/config/legacy github.com/fatedier/frp/pkg/config github.com/fatedier/frp/pkg/config/types github.com/fatedier/frp/pkg/config/v1 github.com/fatedier/frp/pkg/config/v1/validation github.com/fatedier/frp/pkg/errors github.com/fatedier/frp/pkg/metrics/aggregate github.com/fatedier/frp/pkg/metrics/mem github.com/fatedier/frp/pkg/metrics/prometheus github.com/fatedier/frp/pkg/metrics github.com/fatedier/frp/pkg/msg github.com/fatedier/frp/pkg/nathole github.com/fatedier/frp/pkg/plugin/client github.com/fatedier/frp/pkg/plugin/server github.com/fatedier/frp/pkg/proto/udp github.com/fatedier/frp/pkg/sdk/client github.com/fatedier/frp/pkg/ssh github.com/fatedier/frp/pkg/transport github.com/fatedier/frp/pkg/util/http github.com/fatedier/frp/pkg/util/limit github.com/fatedier/frp/pkg/util/log github.com/fatedier/frp/pkg/util/metric github.com/fatedier/frp/pkg/util/net github.com/fatedier/frp/pkg/util/system github.com/fatedier/frp/pkg/util/tcpmux github.com/fatedier/frp/pkg/util/util github.com/fatedier/frp/pkg/util/version github.com/fatedier/frp/pkg/util/vhost github.com/fatedier/frp/pkg/util/wait github.com/fatedier/frp/pkg/util/xlog github.com/fatedier/frp/pkg/virtual github.com/fatedier/frp/server/controller github.com/fatedier/frp/server/group github.com/fatedier/frp/server/metrics github.com/fatedier/frp/server/proxy github.com/fatedier/frp/server/visitor github.com/fatedier/frp/server/ports github.com/fatedier/frp/server

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @AMELkhdfjd on GitHub (May 24, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4240 ### Bug Description Running gomobile bind -target ios generates following error: ``` functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one value, and optionally an error: StatusExporter.GetProxyStatus functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one value, and optionally an error: Collector.ClearOfflineProxies functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error functions and methods must return either zero or one values, and optionally an error panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10066f7c4] goroutine 1 [running]: golang.org/x/mobile/bind.(*funcSummary).asMethod(0x0, 0x14018f7d7d8) /Users/mel337zoti1820/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240520174638-fa72addaaa1b/bind/genobjc.go:558 +0x24 golang.org/x/mobile/bind.(*ObjcGen).genStructH(0x14018f7d7d8, 0x14007d44eb0, 0x1401b0ad020) /Users/mel337zoti1820/go/pkg/mod/golang.org/x/mobile@v0.0.0-20240520174638-fa72addaaa1b/bind/genobjc.go:1141 +0xb0c golang.org/x/mobile/bind.(*ObjcGen).GenH(0x14018f7d7d8) ``` ### frpc Version 0.58.0 ### frps Version 0.58.0 ### System Architecture Mac14,2 ### Configurations Mac14,2 ### Logs _No response_ ### Steps to reproduce command executed: ``` gomobile bind -target=ios github.com/fatedier/frp/client github.com/fatedier/frp/client/event github.com/fatedier/frp/client/health github.com/fatedier/frp/client/proxy github.com/fatedier/frp/client/visitor github.com/fatedier/frp/cmd/frpc/sub github.com/fatedier/frp/pkg/auth/legacy github.com/fatedier/frp/pkg/auth github.com/fatedier/frp/pkg/config/legacy github.com/fatedier/frp/pkg/config github.com/fatedier/frp/pkg/config/types github.com/fatedier/frp/pkg/config/v1 github.com/fatedier/frp/pkg/config/v1/validation github.com/fatedier/frp/pkg/errors github.com/fatedier/frp/pkg/metrics/aggregate github.com/fatedier/frp/pkg/metrics/mem github.com/fatedier/frp/pkg/metrics/prometheus github.com/fatedier/frp/pkg/metrics github.com/fatedier/frp/pkg/msg github.com/fatedier/frp/pkg/nathole github.com/fatedier/frp/pkg/plugin/client github.com/fatedier/frp/pkg/plugin/server github.com/fatedier/frp/pkg/proto/udp github.com/fatedier/frp/pkg/sdk/client github.com/fatedier/frp/pkg/ssh github.com/fatedier/frp/pkg/transport github.com/fatedier/frp/pkg/util/http github.com/fatedier/frp/pkg/util/limit github.com/fatedier/frp/pkg/util/log github.com/fatedier/frp/pkg/util/metric github.com/fatedier/frp/pkg/util/net github.com/fatedier/frp/pkg/util/system github.com/fatedier/frp/pkg/util/tcpmux github.com/fatedier/frp/pkg/util/util github.com/fatedier/frp/pkg/util/version github.com/fatedier/frp/pkg/util/vhost github.com/fatedier/frp/pkg/util/wait github.com/fatedier/frp/pkg/util/xlog github.com/fatedier/frp/pkg/virtual github.com/fatedier/frp/server/controller github.com/fatedier/frp/server/group github.com/fatedier/frp/server/metrics github.com/fatedier/frp/server/proxy github.com/fatedier/frp/server/visitor github.com/fatedier/frp/server/ports github.com/fatedier/frp/server ``` ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:09:20 -06:00
Author
Owner

@fatedier commented on GitHub (May 31, 2024):

This project does not support iOS, and I am not familiar with gomobile, so I cannot provide assistance.

<!-- gh-comment-id:2141327218 --> @fatedier commented on GitHub (May 31, 2024): This project does not support iOS, and I am not familiar with gomobile, so I cannot provide assistance.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 22, 2024):

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:2183610511 --> @github-actions[bot] commented on GitHub (Jun 22, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3340
No description provided.