Closed bencehari closed 3 years ago
Hmm, I don't know what could be causing the crash (don't have any iOS development environment set up), but I see that the example code most likely isn't behaving the way that you want it to. Just setting label.Text
directly is not going to update the displayed text on its own. You would either have to call label.Refresh()
afterwards or just call label.SetText(fmt.Sprintf("%d", inc))
.
Hi Jacalz,
Thanks for the quick response! Strangely in the rare cases when the app has not closes instantly, updating the label's text in this way is working fyne :)
This sometimes happens when your fyne
executable and fyne version are not the same.
Make sure your code is using fyne v2.0.3 as well (by updating the module file or updating your GOPATH checkout - rebuilding with that version could fix the issue.
Thanks for the answer andydotxyz!
Where can I verify that the executable and fyne version are the same? After several failed attempt I reinstalled go and fyne altogether, but result is the same.
go downloaded through "brew install go"
fyne was downloaded by "go get fyne.io/fyne/v2" and the fyne utility with "go get fyne.io/fyne/v2/cmd/fyne" and then "fyne install"
I have "fyne.io/fyne/v2 v2.0.3" in both go.mod and go.sum
I have also removed the "~/go/pkg/mod/fyne.io/fyne1.4.xyz" folder, maybe it's interfering. Didn't worked.
What do you get by executing fyne env
?
cli_version="v2.0.3" go_mod="true" go_path="false" imported="true" path="~/Projects/Go/ProjectManager" version="v2.0.3"
version="go1.16.4 darwin/amd64"
CGO_ENABLED="1" GO111MODULE="" GOARCH="amd64" GOOS="darwin"
That does look OK, more information will be needed from the iOS log, which will report the reason for crash. You can use the macOS Console app to see what is going on in the device.
The app's log filtered by process. It's not reporting any error.
Filtering device's log by errors shows this, when the app quits:
The error will not report as an "error" in the filter as that is a feature we don't have access to when crashing. You'll need to trawl your logs for anything related. It should be "main" process if the app crashed, but if the OS caused it to exit then it may have other identity. Try filtering based on your app ID instead.
I place a screenshot here, because it's much more readably, than the dump, highlighted where I think things did go wrong, but I don't know what triggered it.
If something important is not on the screenshot, here is the dump:
60 default 17:44:23.306020+0200 SpringBoard Creating process for executionContext with identity: application
That log seems to end around the time the application became "visible" - is there nothing else?
I couldn't get different outcome out of it unfortunately... I'll get an Android phone. Maybe if I got the same error, Logical will tell more. I spend several hours to find a solution, but now I'm out of ideas...
There should certainly be more information in the log. iOS will report that the app was killed or tidied up for example, which was missing above - that's why I asked if there was more. I was also hoping that between what you posted and the cleanup logs there would be the error logged...
Here it is an unfiltered log. In this case, the app started, and after 2-3 sec it closed (I did not do anything). Searching for suspicious lines...
It's too long for comment. https://1drv.ms/t/s!AutgNH9Cs4o3qket5cYficK3fa2V?e=0yXosR
The errors and faults extract from the previous:
49 error 21:01:51.542957+0200 wifid WiFiManagerDispatchLQMEvent: Dispatching LQM event to symptomsd
49 error 21:01:56.559617+0200 wifid WiFiManagerDispatchLQMEvent: Dispatching LQM event to symptomsd
49 error 21:02:01.578443+0200 wifid WiFiManagerDispatchLQMEvent: Dispatching LQM event to symptomsd
60 error 21:02:01.815937+0200 SpringBoard Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Assertion's invalidation time is in the past" UserInfo={IgnoreOnReconnect=true, NSLocalizedFailureReason=Assertion's invalidation time is in the past}>
60 error 21:02:01.816586+0200 SpringBoard [<_UIKeyboardArbiterHandle: 0x2807623c0; PID 1892: (null) <(null)>; hosting PIDs {(
)}; level 0.000000; active NO [wants NO]; suppression 0; iav 0.000000; on screen NO>] could not take process assertion
1231 error 21:02:02.016283+0200 misagent Saving new cache.
4092 error 21:02:02.034599+0200 splashboardd Error generating launch image for com.h4ri.projectmanager: <XBLaunchImageError: 0x102205440; domain: XBLaunchStoryboardErrorDomain; code: 1; reason: "No such interface found.">
60 error 21:02:02.036359+0200 SpringBoard Snapshot generation resulted in an error with code: 1 for app bundleID:
]> inheritanceManager:<RBClientInheritanceManager| inheritances:[
<RBSInheritance| environment:UIScene:com.apple.frontboard.systemappservices::sceneID%3Acom.h4ri.projectmanager-default name:com.apple.frontboard.visibility origID:32-60-26317 payload>,
<RBSInheritance| environment:UIHostedWindow:6f5be9db name:com.apple.frontboard.visibility origID:32-60-26322 payload>,
<RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:32-60-26318>
]>>
60 error 21:13:31.981571+0200 SpringBoard Ignoring state for untracked process [application
Thanks, there was a whole lot more in that log.
I would think that this line somehow holds the clue:
SpringBoard [application<com.h4ri.projectmanager>:5229] Workspace connection invalidated.
Sadly I don't know what can cause this or why your app / phone is experiencing it. Is there anything special about your iPhone SE, or the certificate/provisioning profile setup?
I have not tweaked with my iPhone, and it runs the lates iOS. I didn't make anything manually. I just created an Xcode project with the desired appID to let Xcode register it on my Mac, and used that appID to package the project.
As I can see, fyne package don't even have the certificate and profile params.
It will pick up your default certificate and provisioning IIRC. Did the XCode process you mention leave files in the directory? Those steps should not be needed and may have left something extra in the project?
If I skip that step and try to package with a different appID (I changed the appID from com.h4ri.projectmanager to com.h4ri.pm), I got his error:
xcrun xcodebuild -configuration Release -project /var/folders/bj/fw307qd56dn6jk55sb_6nycr0000gn/T/gomobile-work-612755535/main.xcodeproj -allowProvisioningUpdates DEVELOPMENT_TEAM=
User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
DEVELOPMENT_TEAM =
2021-06-03 14:57:54.783 xcodebuild[56188:1101839] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called note: Using new build system note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete error: No account for team "Bence Hari (Personal Team)". Add a new account in the Accounts preference pane or verify that your accounts have valid credentials. (in target 'main' from project 'main') error: No profiles for 'com.h4ri.pm' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.h4ri.pm'. (in target 'main' from project 'main')
BUILD FAILED
Is there any way to specify the team for signing? I removed my account from Xcode, I hoped then it will use my job developer account, but it doesn't care and it uses my personal team.
Are you running xcrun
directly, or is that the output of fyne package
?
This is the output of fyne package
You don't need XCode to set up the appID, you can set it up in the Apple developer portal. However you do it, the provisioning profile needs to be downloaded and using these the appID finds the certificate that it was created for. I guess that XCode has done this automatically for you, but my concern is whether it has left extra (non-go) files in the working directory.
I created them, but I can't use them, because fyne package uses my personal account, not the developer account (this is my Mac logged in with my AppleID, and I have another account set in Xcode, which is the developer account).
That is why I needed to create the dummy Xcode project to make the appID with my personal account, which is not a developer account, so I cannot create certificates and profiles for it.
I tried to remove my account in Xcode's accounts menu and leave the developer account, but it had no impact to the process. Fyne try using my personal account.
Fyne does not look up your account - it just uses what is found on your system (in the provisioning profiles folder and keychains). We don't use the XCode account feature or your Apple ID in any way.
Hmmm, I deleted every record what was related my personal team in the Keychain Access, then created the certificate and provisioning profile (which I installed to my iPhone manually), with a different appID (just to be safe), but the same result.
I don't know what am I doing wrong, I'll try again...
No success. If I changed the provisioning profile from developer to AdHoc, I can see new errors from the app:
AdHoc is not the right thing to do - that is for releasing to others in your company, to "fyne package" it should be a developer profile. I don't recognise those errors but they are not from Fyne... Is there more information about the missing file if you tap that entry?
The main process said that, which is the app. No, this is all what it said. Then I switch back to developer and trying.
This may not be much comfort but I have now seen this same error when setting up development for a friends iPad. I will try to explore further what may be causing it on that device but not my own.
Sorry for the silence, I'm damn busy nowadays. Unfortunately I haven't figured it out yet...
Not a problem. There are all sorts of random reports on the web of 14.x causing issues (like with Flutter and others), but I don't know for sure if it is that or something else.
I think I have narrowed this down to the XCode and/or macOS version used to build - can you please confirm what they are for you @bence-hari?
macOS Big Sur 11.4 (20F71) Xcode 12.5 (12E262)
Thanks. That matches my problematic machine as well. I will update everything except from OS and XCode on another machine to confirm my suspicion.
You rock! Thank you! :)
Confirmed. Same settings on Catalina with XCode 12.4 build apps that run fine. Now to explore what broke in the mac upgrade :(.
Same on the new Xcode version... Xcode 12.5.1 (12E507)
Can you try (from your project directory):
$ go clean
$ go clean -cache
$ go clean -modcache
And then build the iOS bundle again - see if it makes any difference. I am playing with some ideas here - and I can make the reported error go away, but I am not certain that it increases stability. Something else is causing the app to crash with latest XCode.
Can you try (from your project directory):
$ go clean $ go clean -cache $ go clean -modcache
And then build the iOS bundle again - see if it makes any difference. I am playing with some ideas here - and I can make the reported error go away, but I am not certain that it increases stability. Something else is causing the app to crash with latest XCode.
Tried. Unfortunately with the same results
Thanks. It seems like something in the iOS app requirements may have changed. Discussing with some iOS experts I know to see if we can find the cause.
The mystery deepens... I upgraded to BigSur on an older computer that was building great and it continued to build. I then installed Go 1.16 (was on 1.15) and the built apps now don't run!
If possible @bence-hari could you please try building using Go 1.15 to check if you then get a running app?
You are right. With Go 1.15 the app is running fyne.
That is great news, but now we need to figure out why Go 1.16 triggers these failures!
If I can help anything, let me know!
Workspace interruption policy did change: terminate
I think this may be the first worrying line. This needs a higher priority resolution as Go 1.17 shows the same behaviour :(
Open up an issue on the Go issue tracker? It’s best to inform them about what we are seeing.
But I don't know for certain that it is their error yet.
Added https://github.com/golang/go/issues/47952 - the Apple devs are pretty sure this is a Go issue.
On that ticket it has been confirmed to not be limited to Fyne, which is nice to hear :)
For better record, this was fixed in 5f636ff2489b283c3cfde29e23bd762f511c693e.
https://user-images.githubusercontent.com/32988315/120218421-00aa8900-c23a-11eb-8456-37ea390e967d.mov
Hi all!
I compiled a little test app, and it's constantly crashes on iPhone. Rarely when the app opens, after some time it's closes also. Running on the macOS with "go run ." command works as it should.
The code:
I created an empty Xcode project for making a valid bundle id for the app, then packaged the app with this command: fyne package -os ios -appID, then installed the app on my iPhone SE2 through Xcode/Window/Devices and Simulators.
I didn't find a good way to debug the app, so I checked in the Console.app and it's says: "Snapshot generation request for bundleID: rejected due to the app being denylisted.". I didn't find any help with that message.