"Failed to execute goal" - build-ios goal fails in maven very often

30 views
Skip to first unread message

P5music

unread,
May 18, 2021, 7:01:26 AM5/18/21
to CodenameOne Discussions
I am able to test my CN1 app on the iOS simulator, after the maven system produces the XCode project.
Very often I get this error below, but restoring a fresh system can help. But it is stuck now. I need that the real problem goes away so that nothing can end up leading to this error.
Thanks in advance


(here are many other parsing lines)


Parsing: /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AbstractMedia$2StateChangeListener.class
Parsing: /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AudioBuffer$1.class
[INFO] Rewrite /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/dist/myapp-src/cn1_globals.h with 1 changes
[INFO]
[INFO] outputDirectory is: /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/dist/myapp-src
[INFO] 43 native files
[INFO] Native files total 1028K
[INFO]
[INFO] unusued Method cull removed 3010 methods in 91 seconds
[INFO]
[INFO] Rewrite /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/dist/myapp.xcodeproj/project.xcworkspace/contents.xcworkspacedata with 1 changes
[INFO]
[INFO] Rewrite /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/dist/myapp.xcodeproj/project.pbxproj with 60 changes
[INFO]
[INFO] Rewrite /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/dist/myapp-src/myapp-Info.plist with 5 changes
[INFO]
[INFO] Process return code is 0
[INFO] Executing:
[INFO] echo chmod 0755 /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[INFO] Executing with timeout -1
[INFO] chmod 0755 /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[INFO] Process return code is 0
[INFO] Executing:
[INFO] chmod 0755 /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[INFO] Executing with timeout -1
[INFO] Process return code is 0
[INFO] Executing:
[INFO] echo /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[INFO] Executing with timeout -1
[INFO] /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[INFO] Process return code is 0
[INFO] Executing:
[INFO] /Users/mac/sviluppo/myapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[INFO] Executing with timeout -1
[INFO] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:1:in `require'
[INFO] : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/delegate.rb:1: invalid multibyte char (UTF-8) (SyntaxError)
[INFO]
[INFO]     from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:1:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in `<module:Gem>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:116:in `<top (required)>'
    from <internal:gem_prelude>:2:in `require'
    from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
[INFO] Process return code is 1
[INFO] Failed to fix xcode project schemes.  Make sure you have Cocoapods installed.

and

Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.26:build (build-ios) on project myapp-ios: iOS build failed

Shai Almog

unread,
May 18, 2021, 10:34:04 PM5/18/21
to CodenameOne Discussions
Is cocoapods installed?

P5music

unread,
May 19, 2021, 2:13:44 AM5/19/21
to CodenameOne Discussions
Yes, as I said it just fails sometimes, it seems that it is caused by some kind of slowness or timeout, but the error is the one I mentioned in most recent cases.
Regards

Shai Almog

unread,
May 19, 2021, 10:29:45 PM5/19/21
to CodenameOne Discussions
Yes. I think there's a timeout for some operations. I need to check.

P5music

unread,
May 20, 2021, 2:44:19 AM5/20/21
to CodenameOne Discussions
I checked the error and I realized that there is a corrupted file
[INFO] : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/delegate.rb:1: invalid multibyte char (UTF-8) (SyntaxError)

it is full of random characters.
Some other .rb files are normal readable source code, while other are "obfuscated" as well.
If other files are "obfuscated" can it depend on real obfuscation?
If there is not obfuscation I have to reinstall Ruby. But what if that's Ruby installation issue itself?

I do not know if this happens when some timeout occurs,
while when timeout occurs that file is effectively needed and accessed so the corrupted text causes the error.
Maybe changing the timeouts somewhere it works again because that file is never needed.
?
Regards

Shai Almog

unread,
May 21, 2021, 12:47:40 AM5/21/21
to CodenameOne Discussions
There's no timeout. I think your install of ruby is broken. Not  an expert on Ruby though so I'm not sure.
Reply all
Reply to author
Forward
0 new messages