Skip to content
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

PhaseScriptExecution failed when hitting Play in Xcode #739

Closed
sppenn opened this issue Aug 5, 2022 · 10 comments
Closed

PhaseScriptExecution failed when hitting Play in Xcode #739

sppenn opened this issue Aug 5, 2022 · 10 comments
Labels

Comments

@sppenn
Copy link

sppenn commented Aug 5, 2022

This is my first kivy app and I suspect the issue has to do with how things are set up, but I haven't been able to figure it out on my own. I am able to run the app with "% python main.py". I can create working Android version of the app that runs on my phone. However, I'm not able to run the app from Xcode.

Versions

  • Python : 3.9.13
  • MacOS version : 12.5
  • XCode Version : 13.4.1
  • Cython version : 0.29.28

Describe the bug
The last successful command was
$ open gboctrackingapp-ios/gboctrackingapp.xcodeproj
The Xcode build fails when hitting Play.

To Reproduce
Followed the steps in Create a package for IOS, and tried to Play the project.

Expected behavior
Expected to see the app running on my screen

Logs
I have the log file captured as a txt file. However it has 155,726 lines of text and is 28MB. Only 25MB is allowed to be uploaded as a file to this bug report. Here is a link to the file --
https://drive.google.com/file/d/12tauLQLHWm17n-tcizVTsgZpYs9_1Ta8/view?usp=sharing

Screenshots
Screen Shot 2022-08-05 at 3 33 11 PM

Additional context
Here are the commands I used within the virtual environment --
I first created GBoCTrackingApp folder
Copied over the 13 *.py and *.kv files from previous builds so that I started fresh
then ran “python main.py” just to test it and see it run
pip install kivy-ios
toolchain build kivy
toolchain create GBoCTrackingApp ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp
open gboctrackingapp-ios/gbcotrackingapp.xcodeproj

@misl6
Copy link
Member

misl6 commented Aug 6, 2022

Hi @sppenn !

In which folder did you launch toolchain build kivy and toolchain create GBoCTrackingApp ?

@sppenn
Copy link
Author

sppenn commented Aug 6, 2022

Sorry, I missed a step in my description. After creating the GBoCTrackingApp folder and copying the files, I cd'd over to ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp and never left that particular folder. I issued all the commands while in that older.

Here are the commands I used within the virtual environment --
I first created GBoCTrackingApp folder using Apple's Finder
Copied over the 13 *.py and *.kv files from previous builds so that I started fresh using Apple's Finder
cd GBoCTrackingApp from within Terminal
then ran “python main.py” just to test it and see it run
pip install kivy-ios
toolchain build kivy
toolchain create GBoCTrackingApp ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp
open gboctrackingapp-ios/gbcotrackingapp.xcodeproj

Here are couple of screenshots of the folder sctructure (if it helps.)
This is the folder where main.py exists and the folder I work from. It has the error log as a txt file that I saved after getting the error.

Screen Shot 2022-08-06 at 7 43 27 AM

This is the folder structure of the subfolder gboctrackingapp-ios
Screen Shot 2022-08-06 at 7 45 33 AM

@sppenn
Copy link
Author

sppenn commented Aug 8, 2022

Been trying to work through the problem and making no progress. Stuck on the same error. I am getting two "Alerts" when running the command
$ toolchain build kivy

Don't know if these messages help in diagnosing the problem, but I'm trying to give as much information as possible.

Here are the screenshots of the alerts and when they pop up.
Screen Shot 2022-08-07 at 12 56 18 PM

Screen Shot 2022-08-07 at 12 58 37 PM

@342261733
Copy link

@sppenn Have you solved this problem? I have the same problem.

@sppenn
Copy link
Author

sppenn commented Aug 12, 2022

Nope. I got nothing. I've searched, posted on discord, and done everything else I can think of. Can't get past this error. I like Kivy, enjoyed learning it, but I've tried so many things that I now need to uninstall everything.

@misl6
Copy link
Member

misl6 commented Aug 12, 2022

Sorry, I missed a step in my description. After creating the GBoCTrackingApp folder and copying the files, I cd'd over to ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp and never left that particular folder. I issued all the commands while in that older.

Here are the commands I used within the virtual environment -- I first created GBoCTrackingApp folder using Apple's Finder Copied over the 13 *.py and *.kv files from previous builds so that I started fresh using Apple's Finder cd GBoCTrackingApp from within Terminal then ran “python main.py” just to test it and see it run pip install kivy-ios toolchain build kivy toolchain create GBoCTrackingApp ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp open gboctrackingapp-ios/gbcotrackingapp.xcodeproj

Here are couple of screenshots of the folder sctructure (if it helps.) This is the folder where main.py exists and the folder I work from. It has the error log as a txt file that I saved after getting the error.

Screen Shot 2022-08-06 at 7 43 27 AM

This is the folder structure of the subfolder gboctrackingapp-ios Screen Shot 2022-08-06 at 7 45 33 AM

HI @sppenn and @342261733 !

Ok, now it makes sense. (Sorry for the late reply, but I'm on vacation and I rarely look at notifications)

You shouldn't create the *-ios project and do the build in the same folder of your app.

As an example:

  • /Users/myuser/Documents/myapp <-- Here you should place your app files (.py, .kv, .jpg, ...)
  • /Users/myuser/Documents/kivyios-build-myapp <-- Here you should build the needed dependencies via toolchain. It may also contain the myapp-ios, which is the folder created via toolchain create GBoCTrackingApp ....

Why?
When pressing the build button, a rsync script is executed and copies all the content of ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp into a subfolder of gboctrackingapp-ios, named YourApp.

But, as you can see, due to your folder structure, gboctrackingapp-ios, dist and build (which shouldn't be copied) are actually a subfolder of ~/Documents/Professional/LearnKivy/MyKivyProjects/GBoCTrackingApp.

@misl6
Copy link
Member

misl6 commented Aug 12, 2022

Closing the issue as support, but feel free to ask on Discord. (I may be slow to respond for another week or two, but a lot of users will surely try to help you)

@misl6 misl6 added the support label Aug 12, 2022
@github-actions
Copy link

👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

If you're having trouble installing or using kivy-ios, maybe you could be interested to installation and requirements.

Let us know if this comment was made in error, and we'll be happy to reopen the issue.

@sppenn
Copy link
Author

sppenn commented Aug 12, 2022

Thank you so much! I now have a plan. I still need to uninstall, and start all over. I think that will help. Also, I will follow your advice from here on using the support channels.

@342261733
Copy link

Thanks a lot, I solved the problem according to your answer. I think the question is that app_directory( in "$ toolchain create <title> <app_directory>") is python's work directory, and it can't contain other files for example build, dist and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants