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

iOS export throws the following error: "JSON text did not start with array or object" #60302

Open
JMedina90 opened this issue Apr 16, 2022 · 10 comments

Comments

@JMedina90
Copy link

Godot version

3.4.4

System information

macOs 12.2 Monterrey, M1

Issue description

Exporting to iOs doesn't work. Throws the following error:

2022-04-16 11:09:07.733 xcodebuild[12148:7643367] Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0., NSJSONSerializationErrorIndex=0}
xcodebuild: error: Unable to read project 'app.xcodeproj' from folder '/Users/xxx/projects/apks'.
    Reason: The project ‘appproject’ is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts.

Path: /Users/xxx/projects/apks/app.xcodeproj

xcodebuild (.ipa):
error: archive not found at path '/Users/xxx/projects/apks/app.xcarchive'
** EXPORT FAILED **

Tried creating a new project and I still get the same error.
Other exports work fine (android, html, macos, etc)

Steps to reproduce

  • Download latest export templates
  • Properly fill iOs options requirements (teamid, identifier, icons).
  • Hit Export Project.

Minimal reproduction project

No response

@Calinou Calinou changed the title [Export] iOs export throws the following error: "JSON text did not start with array or object" iOs export throws the following error: "JSON text did not start with array or object" Apr 16, 2022
@Calinou Calinou changed the title iOs export throws the following error: "JSON text did not start with array or object" iOS export throws the following error: "JSON text did not start with array or object" Apr 16, 2022
@Sc4pego4t
Copy link

Sc4pego4t commented May 22, 2022

Have you found any workaround? I've tried to install previous version of engine 3.4.2, 3.3.4 and it does not fixed that problem. Maybe issue is the last Xcode version?

@Calinou
Copy link
Member

Calinou commented May 25, 2022

This was confirmed by cucaido on the Godot Forums: https://godotforums.org/discussion/29990/failed-to-export-ios-project-due-to-reason-the-project-x-is-damaged-and-cannot-be-opened

@vlyahovich
Copy link

No way to export to ipa in 3.4.4 too unfortunately. Any hints on how to solve it manually?

@vlyahovich
Copy link

UPD: if I use 3.4.2 iphone template in 3.4.4 it seem to export fine

@krupitskas
Copy link

As workaround, App Store Team ID should be not your email but ID like : 4CP59N327WZ

@lawrnce
Copy link
Contributor

lawrnce commented Aug 6, 2022

Actually free users do have an App Store Team ID, but it is not displayed in Xcode. For free users, Xcode displays your email whereas or paid users, Xcode will display the App Store Team ID. But, free users still have a proper App Store Team ID. You need to create a Xcode project and open the .xcodeproj in a text editor and search for the key DEVELOPMENT_TEAM.

buildSettings = {
    ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
    ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
    CODE_SIGN_STYLE = Automatic;
    CURRENT_PROJECT_VERSION = 1;
    DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
****DEVELOPMENT_TEAM = 485FK5P5JK;
    ENABLE_PREVIEWS = YES;
...

@bruvzg
Copy link
Member

bruvzg commented Aug 6, 2022

You can view Team ID of the free "Apple Development" certificate in the macOS Keychain, open certificate and look for "organisational unit" value.

Screenshot 2022-08-06 at 18 58 50

@mhilbrunner
Copy link
Member

This issue seems to be mostly a UX issue, maybe we could make this more clear somehow. Until then, we've now documented this on the docs: godotengine/godot-docs#7069

@bruvzg
Copy link
Member

bruvzg commented Mar 28, 2023

This issue seems to be mostly a UX issue, maybe we could make this more clear somehow.

#74644 adds some extra validation and documentation (including instructions how to get Team ID on macOS/iOS to avoid this error) directly to the export dialog property tooltips.

@jreusser
Copy link

jreusser commented Feb 11, 2024

For others who arrive here--you likely need to populate your "TeamID" accessible from https://developer.apple.com/account#membership

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

No branches or pull requests

9 participants