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

"Invalid Segment Alignment. The app binary at '/Frameworks/Razorpay.framework/Razorpay' does not have proper segment alignment. #53

Closed
rajaishwary opened this issue Feb 8, 2018 · 15 comments

Comments

@rajaishwary
Copy link

Updated to the latest version of lib.

Getting the following error on release build while uploading to the store.

following errors:

  1. ERROR ITMS-90087: "Unsupported Architectures. The executable for KheloMore.app/Frameworks/Razorpay.framework contains unsupported architectures '[x86_64, i386]'."

  2. ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'KheloMore.app/Frameworks/Razorpay.framework/Razorpay' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."

  3. ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."

screenshot123

-- Looking for the solution for specifically second one.

thanks.

RN: 0.51.0
Xcode: 9.2

@rajaishwary rajaishwary changed the title ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'KheloMore.app/Frameworks/Razorpay.framework/Razorpay' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." "Invalid Segment Alignment. The app binary at '/Frameworks/Razorpay.framework/Razorpay' does not have proper segment alignment. Feb 8, 2018
@AbhinavArora95
Copy link
Contributor

@rajaishwary In a framework - images of architecture x86_64 and i386 are provided so that the consumer of the framework is able to compile and run on a simulator. But, when you are uploading your application, you have to strip those architecture images from all the frameworks. If you use cocoapods, it does it for you. But, as you must not be using cocoapods, the task of striping these images relies on you. I am attaching a script file. Download the file, change it's extension from .txt to .sh and run the script on the framework and then upload you ipa on itunes.

StripInvalidArchitectures.txt

@dlucidone
Copy link

dlucidone commented Feb 13, 2018

@AbhinavArora95 I'm getting similar error while uploading its working fine on dev.
Tried with the shell script also but now the build is crashing the moment it launches.
Reason: no suitable image found. Did find: /Users/gofishing/Library/Developer/CoreSimulator/Devices/4368F64A-2C6B-4EEE-9E89-E51C1E6B30CE/data/Containers/Bundle/Application/944DA036-F5B2-4E3D-8180-B391BD60DBA4/superhuman.app/Frameworks/Razorpay.framework/Razorpay: no matching architecture in universal wrapper

@AbhinavArora95
Copy link
Contributor

AbhinavArora95 commented Feb 13, 2018

@dlucidone You would have run the script on the framework and tried to build and run the thing on simulator. You are getting a crash because as mentioned above, running the script removes the architectures of simulators from the framework. And after removing the images of simulators you can't run the same on it.

@dlucidone
Copy link

@AbhinavArora95 By running the script mean (What I have done ) -
1- Created a folder and put the razorpay framework in it.
2- run the script on the same dir and then put the resultant framework in place on older framework in the project(embedded binary and the frameworks)

Am I doing something wrong?

@Prateek479
Copy link

Facing the same issue any possible solution for this .?

@dlucidone
Copy link

dlucidone commented Jun 29, 2018

@Prateek479 Use the shell script to strip the SDK for the production and then use the production SDK in creating release. The production sdk will throw error if you will run it in simulator.

@JacobJT
Copy link

JacobJT commented Jul 25, 2018

I'm just now starting to see this issue, have had PureLayout in my project for a while. I hadn't updated anything with carthage other than running a carthage update, and now I can not even validate, or update to app store.

Is this script the same thing that Carthage has me set up for a "run script phase"?

Oh whoops, another link was to the PureLayout repo so I thought I was there. Sorry for the off topic question. Though... I'm gonna leave it in case anyone can tell me what I might've done to change this and get back on track.

@iThink32
Copy link
Contributor

@JacobJT im not able to understand the problem that you are facing.

@iThink32 iThink32 reopened this Jul 26, 2018
@JacobJT
Copy link

JacobJT commented Jul 26, 2018

@iThink32 Sorry, the "oh whoops" was meant to be under an edit. I googled the same error message from a different repo and this came up. I was getting the unsupported architectures + invalid segments errors when trying to submit to the app store.

It was a different framework (PureLayout), installed via Carthage. I don't know how I was not seeing the issue before, but the fix was making sure my copy-frameworks run script came after linking the binaries.

Sorry for irrelevant spam on this thread! Though, since it's the thread that came up when I searched the issues, I hope these comments may at least help someone else who accidentally stumbles across here.

@iThink32
Copy link
Contributor

no problem @JacobJT

@iThink32 iThink32 reopened this Jul 30, 2018
@iThink32
Copy link
Contributor

closing this issue due to inactivity reopen if required.

@quantaoflight
Copy link

Do we need to remove both x86_64 and i386 or just need to remove the non applicable ones? When we execute the entire script, then compilation is failing.

@iThink32
Copy link
Contributor

Please reopen issues before commenting , anyway please watch the video named creating an app archive on the following link it will solve your problem.

https://razorpay.com/docs/ios/integration-videos/

@iThink32 iThink32 reopened this Aug 17, 2018
@iThink32
Copy link
Contributor

iThink32 commented Sep 3, 2018

closing due to inactivity

@iThink32 iThink32 closed this as completed Sep 3, 2018
@iamromec
Copy link

Facing the same problem with Ionic and couldn't fix with steps. :( Is there anyone could help through it?

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

8 participants