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

[BUG] TWINT Apps cannot be opened when adding payment method (Fatal error/Crash) #1902

Open
ast3150 opened this issue Nov 19, 2024 · 6 comments

Comments

@ast3150
Copy link

ast3150 commented Nov 19, 2024

Describe the bug
When trying to register TWINT as a payment method, the application crashes with a fatal error:

Fatal error: NSArray element failed to match the Swift Array Element type
Expected TWAppConfiguration but found TWAppConfiguration

To Reproduce
Steps to reproduce the behavior:

  1. Build app with Ayen TWINT Native integration
  2. Click on 'Add payment method'
  3. Choose TWINT as payment method
  4. Application crashes with fatal error

Expected behavior
The application does not crash and the selection which TWINT app should be opened is presented.

Screenshots
n/a

Environment

  • Device: iPhone 16 Pro
  • iOS Version: iOS 18.1
  • SDK Version: 5.13.0
  • Adyen API Version: unknown
  • Package management system: SPM
  • Xcode version: 16.1 (16B40)
  • Mac OS type: M1 Max

Relevant source code
File/Line: TwintSDKActionComponent.swift:105
Method: public func handle(_ action: TwintSDKAction)
Line: guard let firstApp = installedApps.first else {

Additional context

  • Twint apps are configured with LSApplicationQueriesSchemes and integration is made as documented in AdyenTwint.md
@ast3150 ast3150 added the bug label Nov 19, 2024
@atmamont
Copy link
Contributor

Thanks for reporting @ast3150!

Could you provide additionally the following:

  • full crash stack trace
  • how you import Twint SDK framework (a screenshot of Xcode General -> Frameworks, Libraries and Embedded content settings might give us something)

TWINT test environment doesn't support iOS18 at the moment so we have limited means for investigation, just to set expectations it might take some time to sort it out.

@ast3150
Copy link
Author

ast3150 commented Nov 20, 2024

Sure, here you go.
FELFEL-2024-11-20-182701.ips.zip

We import the Adyen and AdyenTwint library through Swift Package Manager. Both are added to the "Frameworks, Libraries and Embedded Content" section as normal libraries.
Screenshot 2024-11-20 at 18 33 19

Please note that after reinstalling the library and app, I am currently no longer able to reproduce a crash. However, there is also no progress after choosing the payment method:

Screenshot 2024-11-20 at 18 49 21

@atmamont
Copy link
Contributor

Thanks for logs provided, it helps to narrow down the root cause.

As long as we cannot reproduce the crash, we can only have assumptions:

  • is this the first time you integrate Twint or this crash occured after upgrading Adyen SDK to 5.13.0?
  • Any chance you have TwintSDK imported along with AdyenTwint? It is not necessary as AdyenTwint uses TwintSDK.
  • Regarding the last screenshot with the No such process found error. Is this a chunk of logs that are filtered? Did you try to look for non-error messages?
  • TWINT SDK version that we use now doesn't support iOS18 properly and the testing infra is not ready yet from TWINT side. We cannot release new SDK version fully compatible with iOS18 until we test everything on our side. We are in full contact with TWINT team to speed up the process. This is a known issue and was reported before.

@nauaros
Copy link
Contributor

nauaros commented Nov 22, 2024

Hi @ast3150!

Taking over @atmamont here.

We’ve created a new branch (#1905) where the TwintSDK has been updated to version 8.0.2.

This update resolves the compatibility issue with iOS 18 caused by the deprecated openURL(_:) method.

However, due to limitations in Twint’s ability to provide a complete TEST environment, we have not been able to fully test the entire Twint payment flow. That said, we have successfully verified that the app-to-app switch functionality works with this update.

We encourage you to try out this branch in the meantime while we continue working on verifying the full flow. Once the changes are thoroughly tested, we’ll include them in an official release.

We apologize for any inconvenience caused by these third-party dependencies. If you encounter any issues, please let us know. Thank you for your understanding and cooperation!

Disclaimer: Be aware this is not part of an official release, so keep in mind there can potentially be issues with the update that's why we encourage you to run test to make sure the whole Twint payment flow works as expected on iOS 18.

@ast3150
Copy link
Author

ast3150 commented Nov 25, 2024

Hi there. To answer the stuff above:

is this the first time you integrate Twint or this crash occured after upgrading Adyen SDK to 5.13.0?

no, we have integrated Adyen before, but we're switching from the web-based flow to Adyen-twint-native now.

Any chance you have TwintSDK imported along with AdyenTwint? It is not necessary as AdyenTwint uses TwintSDK.

no, we don't use Twint SDK directly, only through Adyen

Regarding the last screenshot with the No such process found error. Is this a chunk of logs that are filtered? Did you try to look for non-error messages?

I didn't see any relevant non-error messages.

We'll try out the provided feature branch, thanks!

@nauaros
Copy link
Contributor

nauaros commented Nov 26, 2024

Hi @ast3150

Just wanted to let you know that we have been able to test the new update. Everything works fine and it will be included in our next release (v5.14.0) in the coming week. Thank you!

P.S. We will keep this issue opened for now in case you wanna provide any feedback. By the time we release, we will close it.

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

4 participants