-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/mobile: apps built with go 1.12, gomobile and Xcode 10.2 are using non-public APIs #31628
Comments
/cc @hyangah |
Any update on this? We're currently blocked to release an update to Testflight due to this issue. I'm going to try to downgrade to xcode 10.1 to work around the issue for now (see: https://stackoverflow.com/questions/14756026/how-to-downgrade-xcode-to-previous-version). Thanks |
More research seems to indicate it is actually go 1.12 that introduces this failure, my hunch is changes related to: #17490 |
Do you know of documentation about when ptrace is allowed? It's pretty easy to rip out ptrace support, and we can do that because it is package syscall. The stdlib itself doesn't use ptrace. That said, I'd rather not break people's programs unnecessarily. |
I can confirm releasing to Testflight worked again with |
@randall77 Tried to find any documentation on this, but to no luck. Maybe best bet is to disable it, then check if that's enough for the app to pass App Store review? I think people's programs are broken already, if they want it on the App Store that is... |
Any progress on this? |
I think the way forward is to disable ptrace in package syscall. It should be easy because the runtime doesn't depend on it according to Keith. And then, test it in Testflight or App Store. |
I'm hoping to push a quick fix to the app store with the ptrace package disabled. Any guidance on disabling it would be appreciated! I'm taking some blind stabs now. |
I've shamelessly removed ptrace from the syscall package here: https://github.com/textileio/go/tree/sander/ptrace-hackery Our framework is being built with it in CI here: https://github.com/textileio/go-textile/blob/master/.circleci/config.yml#L186 I'll report back when we know whether or not Apple is happy with it. |
thanks @sanderpick ! |
I'm happy to report that Apple has accepted the build 🎉. Thanks for the suggestion @eliasnaur. |
Great! Can you send a CL with your changes so the fix can be included in Go 1.13? |
Marking as Go 1.13 because this needs to go into the go standard library, not gomobile. |
Here's a comparison (changes added on top of go1.12.5 tag): https://github.com/textileio/go/compare/3a1b4e7..ef7e9bd Since this is just an issue with the app store, maybe a flag or env var with gomobile could be used to indicate to go that it ought to strip ptrace from the syscall package... ? |
I think it is better to change syscall.Ptrace to always return an error (for example syscall.ENAVAIL) on darwin/arm and darwin/arm64, leaving darwin/386 and darwin/amd64 alone. Note that you can submit your changes as a Github pull request. |
Would this remove the reference from the syscall trampoline, though? The App store complains about it if it is present at all. It's not a dynamic analysis if it is actually called or not. |
Sure, the trampolines and libc references need to go as well. They are already gone with @sanderpick's changes; I merely suggested the GOARCH dependent approach. |
Change https://golang.org/cl/182297 mentions this issue: |
Change https://golang.org/cl/182317 mentions this issue: |
I was too slow... thanks for tackling this @eliasnaur! |
Thanks a lot! |
The ptrace system call is blocked by the App Store. Updates golang/go#31628 Change-Id: I88977cb2f0892661a7221bc822dd513a951cbf67
The ptrace system call is blocked by the App Store. Updates golang/go#31628 Change-Id: I88977cb2f0892661a7221bc822dd513a951cbf67 Reviewed-on: https://go-review.googlesource.com/c/sys/+/182317 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
After having been unable to build the
lnd
framework on Xcode 10.2 because of a previous issue (see #31284), I was able to build it using the latest gomobile (3e0bab5
) and Xcode v10.2.1 (10E1001) after this fix was merged: #31284 (comment)The iOS app (https://github.com/lightninglabs/lightning-app) using the framework was then built, and submitted to App Store connect.
What did you expect to see?
App builds, and app store distribution encounter no problems.
What did you see instead?
App Store submission fails with the following error:
Additional info
Building and app store submission previously encountered no problems, when using Xcode 10.1 together with
gomobile@ca80213619811c2fbed3ff8345accbd4ba924d45
The text was updated successfully, but these errors were encountered: