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 build fail #46

Closed
rahuldange09 opened this issue Nov 30, 2019 · 16 comments
Closed

ios build fail #46

rahuldange09 opened this issue Nov 30, 2019 · 16 comments

Comments

@rahuldange09
Copy link

rahuldange09 commented Nov 30, 2019

Build failed on ios but works perfectly on android.
Please help needed to integrate in ios as soon as possible.

CocoaPods' output:


Preparing
Analyzing dependencies
Inspecting targets to integrate
Using ARCHS setting to build architectures of target Pods-Runner: (``)
Finding Podfile changes
- Flutter
- fluttertoast
- path_provider
- razorpay_flutter
- shared_preferences
Fetching external sources
-> Fetching podspec for Flutter from `.symlinks/flutter/ios`
-> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `razorpay_flutter` from `.symlinks/plugins/razorpay_flutter/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_f_9_d.txt exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
/usr/local/bin/pod install --verbose plugin = line.split(pattern=separator) if plugin.length == 2 podname = plugin[0].strip() path = plugin[1].strip() podpath = File.expand_path("#{path}", file_abs_path) pods_ary.push({:name => podname, :path => podpath}); else puts "Invalid plugin specification: #{line}" end } return pods_ary end target 'Runner' do use_frameworks! # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock # referring to absolute paths on developers' machines. system('rm -rf .symlinks') system('mkdir -p .symlinks/plugins') # Flutter Pods generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') if generated_xcode_build_settings.empty? puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." end generated_xcode_build_settings.map { |p| if p[:name] == 'FLUTTER_FRAMEWORK_DIR' symlink = File.join('.symlinks', 'flutter') File.symlink(File.dirname(p[:path]), symlink) pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) end } /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:746:in `require_nested_dependencies_for' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686:in `attempt_to_activate' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=invalid+byte+sequence+in+US-ASCII&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- Pod install fails on invalid byte sequence while having LANG=en_US.UTF-8 in profile
CocoaPods/CocoaPods#5780 [closed] [6 comments]
2 weeks ago
- Pod Install failed
CocoaPods/CocoaPods#9222 [closed] [3 comments]
7 weeks ago
- Error while setting up CocoaPods
CocoaPods/CocoaPods#5979 [closed] [23 comments]
06 Dec 2018
and 15 more at:
https://github.com/cocoapods/cocoapods/search?q=invalid%20byte%20sequence%20in%20US-ASCII&type=Issues&utf8=✓
Error output from CocoaPods:

WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8

Error running pod install

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale en-IN)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.40.2)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

@fdharamshi
Copy link

I am getting a similar issue. Issue is solved if i remove razorpay plugin.
Did you find the solution @rahuldange09

@rahuldange09
Copy link
Author

I am getting a similar issue. Issue is solved if i remove razorpay plugin.
Did you find the solution @rahuldange09

Same here if i remove i dont get error. No not resolved yet just workaround i found for ios to run ios debugging using terminal and disabling bitcode for other pods.

@Nautiyalsachin
Copy link
Contributor

@rahuldange09 : This issue is related to cocoa pods, please try to re-install and try to replicate it again. Closing this issue now, you can always open it in future if it still persists.

@rahuldange09
Copy link
Author

Well i tried removing and installing pod again and again it fails but on ios
sometimes it runs after pod install only once but.
Can you cross check with latest flutter release?
Im having this issue because of this I'm not able to use it on iphone

@Nautiyalsachin
Copy link
Contributor

Hi @rahuldange09 : Can you tell me all the steps you followed for installation from the beginning as I am trying to replicate this issue here, also I am not able to link above issue with Razorpay, can you try to create a sample app without your other packages. Re-opening this issue.

@rahuldange09
Copy link
Author

It's normal process just use latest flutter
Create project and add this plugin and debug by vs code.
First I thought its issue with my project may be so then I created another fresh one and added. Still I got issues for ios then i opened issue here.
Please have a look at it

@Nautiyalsachin
Copy link
Contributor

Nautiyalsachin commented Feb 19, 2020

@rahuldange09: have you tried using example code as its working fine in that. Also, try to update your XCode from 11.2.1 to 11.3.1 as there can be an issue with the Swift version.

@rahuldange09
Copy link
Author

Hello,
I'm already using latest xcode 11.3.1 but issue still persist.
I tried example also It works perfectly.
Yes there is issue something related to swift mostly.
If I run "flutter run --debug" in terminal it runs on ios perfectly. But if i run from vs code debug or Android Studio it fails. I can't find reason why it's failing.
The example project is made with older version of flutter and swift, may be that is the reason it's working fine.
Have u tried it with latest version.

@Nautiyalsachin
Copy link
Contributor

@rahuldange09: If the example code is working then I'll suggest you remove the plugin and try to add it again.

@debasiskoley
Copy link

flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.1 19B88, locale en-IN)
• Flutter version 1.12.13+hotfix.8 at /Users/debasis/works/flutter/flutter
• Framework revision 0b8abb4724 (13 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/debasis/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/debasis/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Community Edition (version 2019.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 42.1.4
• Dart plugin version 193.5731

[✓] VS Code (version 1.42.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.1

[✓] Connected device (1 available)
• iPhone



 ### Error

    ```
    ArgumentError - invalid byte sequence in US-ASCII
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:283:in `split'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:283:in `block in ensure_versions_file_loaded'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:282:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:282:in `reduce'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:282:in `ensure_versions_file_loaded'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:204:in `search'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/aggregate.rb:83:in `select'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/aggregate.rb:83:in `search'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:385:in `find_cached_set'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:165:in `search_for'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:267:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:267:in `sort_by'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:746:in `require_nested_dependencies_for'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686:in `attempt_to_activate'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
    ```

    ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

    [!] Oh no, an error occurred.

    Search for existing GitHub issues similar to yours:
    https://github.com/CocoaPods/CocoaPods/search?q=invalid+byte+sequence+in+US-ASCII&type=Issues

    If none exists, create a ticket, with the template displayed above, on:
    https://github.com/CocoaPods/CocoaPods/issues/new

    Be sure to first read the contributing guide for details on how to properly submit a ticket:
    https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

    Don't forget to anonymize any private data!

    Looking for related issues on cocoapods/cocoapods...
     - Pod install fails on invalid byte sequence while having LANG=en_US.UTF-8 in profile
       https://github.com/CocoaPods/CocoaPods/issues/5780 [closed] [7 comments]
       19 Dec 2019

     - Pod Install failed
       https://github.com/CocoaPods/CocoaPods/issues/9222 [closed] [3 comments]
       14 Oct 2019

     - Error while setting up CocoaPods
       https://github.com/CocoaPods/CocoaPods/issues/5979 [closed] [23 comments]
       06 Dec 2018

    and 15 more at:
    https://github.com/cocoapods/cocoapods/search?q=invalid%20byte%20sequence%20in%20US-ASCII&type=Issues&utf8=✓

Error output from CocoaPods:
↳
        WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
        Consider adding the following to ~/.profile:

        export LANG=en_US.UTF-8
        

Error running pod install

I have tried it with the latest version. I am getting a similar issue.

@Nautiyalsachin
Copy link
Contributor

Please follow up with this issue CocoaPods/CocoaPods#6333. As I have mentioned earlier this issue is because of Cocoapods.

@rahuldange09
Copy link
Author

Great,
Its fixed, I added export utf 8 in .zshrc also that fixed it.
I already added i profile and bash profile after reading some issue but that never fixed issue.
But @Nautiyalsachin I also follwed your link and there some guy mentioned to add in .zshrc. Which in terns fixed my problem.
So thank you so much for help.
I was aware of that its not related to razorpay but because you guys are first amongst some who enabled bitcode which caused that issue.
But thanks for support and help.

@balasubramanian1612s
Copy link

@rahuldange09 Hey bro, could you please say what you did, i have same issue..

@rahuldange09
Copy link
Author

@rahuldange09 Hey bro, could you please say what you did, i have same issue..

I mentioned in above comment. Please check that as I was using iTerm as default so.

@jijuthomas98
Copy link

../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.4/lib/razorpay_flutter.dart:89:29: Error: The getter 'context' isn't defined for the class 'Razorpay'.
- 'Razorpay' is from 'package:razorpay_flutter/razorpay_flutter.dart' ('../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.4/lib/razorpay_flutter.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'context'.
_eventEmitter.on(event, context , cb);

This is the error i am getting when trying to build with razorpay, the android counterpart is build with problem. But what ever i do the build fails agian and again.

@Nautiyalsachin
Copy link
Contributor

@jijuthomas98 We have released a fixed for android recently, I would suggest you to have a look on that as well. Try updating the plugin to latest version.

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

No branches or pull requests

6 participants