square / in-app-payments-flutter-plugin

Flutter Plugin for Square In-App Payments SDK
https://developer.squareup.com/docs
Apache License 2.0
339 stars 121 forks source link

When used with other plugins, the app crashes. (SquareBuyerVerificationSDK`___lldb_unnamed_symbol8290) #222

Closed yurso666 closed 7 months ago

yurso666 commented 1 year ago

Describe the issue

I have encountered a very strange issue and have no idea about it.

This plugin runs well in my project until I added a custom iOS plugin that uses opentok lib. When I open a page that doesn't use any square code at all and call some methods of the opentok plugin, the app crashes.

Here is the log:

flutter: ==================
flutter: OpenTokConnectionState.wait

flutter: null
[Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 94 named com.apple.commcenter.coretelephony.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service with pid 94 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.}
***** OpenTok iOS SDK | Version/Revision: ios-2.25.0/d4431ca9bcd213d5f2faa19289fa919cfeac7e97 | Library built on: Apr  3 2023 | CA bundle version: Tue Jan 10 04:12:06 2023 GMT | Copyright 2023 Vonage | https://www.vonage.com/legal/communications-apis/terms-of-use/
opentok session id: 2_MX40NzQ3NzUzMX5-MTY4NTIzNzU3ODcyN35ZSFdoUTFEQXFyNnVnN2x3QVAyWU1wNmZ-UH5-

* thread #45, stop reason = EXC_BAD_ACCESS (code=1, address=0xffffffffffffffe8)
    frame #0: 0x00000001045b9394 SquareBuyerVerificationSDK`___lldb_unnamed_symbol8290 + 40
SquareBuyerVerificationSDK`___lldb_unnamed_symbol8290:
->  0x1045b9394 <+40>: str    xzr, [x19]
    0x1045b9398 <+44>: adrp   x2, 258
    0x1045b939c <+48>: add    x2, x2, #0x12d            ; "ex_data.c"
    0x1045b93a0 <+52>: mov    w0, #0x5
Target 0: (Runner) stopped.
Lost connection to device.

To Reproduce

When I removed the square plugin, the custom opentok plugin ran normally.

When I add this plugin again and call some methods of OpenTok (specifically: session?.connect(withToken: config.token, error: &error)), the app will crash.

Expected behavior

this plugin can work with other custom plugins.

Environment (please complete the following information):

flutter doctor -v results:

[✓] Flutter (Channel stable, 3.7.12, on macOS 13.2.1 22D68 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.7.12 on channel stable at /Users/admin/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (6 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/admin/Library/Android/sdk/
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/admin/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

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

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.1,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (3 available)
    • iPhone (mobile) • 00008030-000E5DDC3A83802E • ios            • iOS 16.4.1 20E252
    • macOS (desktop) • macos                     • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
    • Chrome (web)    • chrome                    • web-javascript • Google Chrome 113.0.5672.126

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Additional context

It doesn't have this issue on Android.

This is too strange because when I load the page that uses a custom opentok plugin, I don't use any square code at all.

Can someone provide some ideas? Thank you very much..!

CharmisG commented 1 year ago

Hello @yurso666

Have you done it following the below steps ? https://github.com/square/in-app-payments-flutter-plugin/blob/master/doc/get-started.md#step-2-update-your-ios-project

yurso666 commented 1 year ago

@CharmisG Yes, I did it. but it doesn't help with my issue...

CharmisG commented 1 year ago

@yurso666 Can you please share any image or video so we can help you faster.

Charmis-Square commented 7 months ago

Closing as we have not gotten a follow up from the developer. Feel free to reopen if you are still facing this issue.