woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

[Mobile Payments] Not possible to fix some onboarding errors via authenticated webview as stripe embedded window is not opening #12917

Closed kidinov closed 6 days ago

kidinov commented 1 week ago

Closes: #12907

Description

It looks like some time ago, the stripe site started to open in a pop-up in a browser (I validated that in a desktop browser), and our authenticated web view doesn’t support it on Android, so a user ends up in an endless loading state.

The PR replaces authenticated web view with chrome tabs, which means that if a user is not logged in in a browser, then they will need to enter their credentials. I could not make it work with webview

Steps to reproduce

On the web wp-admin:

In The app:

Testing information

The tests that have been performed

The steps from the steps to reproduce

Images/gif

https://github.com/user-attachments/assets/dea433fe-edc3-4987-a935-47532498141a

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

wpmobilebot commented 1 week ago
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitcf01542ac1b949cd2deaf86ddec02d7db164c7a9
Direct Downloadwoocommerce-wear-prototype-build-pr12917-cf01542.apk
wpmobilebot commented 1 week ago

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitcf01542ac1b949cd2deaf86ddec02d7db164c7a9
Direct Downloadwoocommerce-prototype-build-pr12917-cf01542.apk
codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 39.61%. Comparing base (6bca21e) to head (cf01542). Report is 10 commits behind head on trunk.

Files with missing lines Patch % Lines
...erce/android/ui/compose/component/web/WCWebView.kt 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12917 +/- ## ============================================ - Coverage 39.61% 39.61% -0.01% + Complexity 5929 5927 -2 ============================================ Files 1260 1260 Lines 72836 72832 -4 Branches 9965 9963 -2 ============================================ - Hits 28856 28852 -4 Misses 41410 41410 Partials 2570 2570 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

AnirudhBhat commented 1 week ago

Thanks for working on this @kidinov

I tried the steps to reproduce on trunk and I could see the onboarding screens. If I understand correctly, the onboarding on web view from trunk should be broken right? Let me know if I'm doing something wrong.

https://github.com/user-attachments/assets/3380ef40-fe28-441b-844c-65113b55c47b

I also tried to run this change on tablet device (Emulator) from this branch and the onboarding on web view very slow and didn't load the screens properly. On the phone, it worked just fine

https://github.com/user-attachments/assets/589aa13d-cb20-4337-8b70-26a069dce35f

kidinov commented 1 week ago

@AnirudhBhat 👋

It looks like that you use not wpcom site that's why chrome tab used instead of webview and therefore that worked fine

https://github.com/woocommerce/woocommerce-android/pull/12917/files#diff-d0d7f8bc957e25d0d4eb0980bfeda1d2de0d4a6ad7853ce4d46426cbe616d9bfL91

AnirudhBhat commented 1 week ago

It looks like that you use not wpcom site that's why chrome tab used instead of webview and therefore that worked fine

Ah. Got it 👍

also tried to run this change on tablet device (Emulator) from this branch and the onboarding on web view very slow and didn't load the screens properly. On the phone, it worked just fine

Is the change from this PR working fine on tablet (emulator) for you? It works fine on phone whereas on tablet, it throws some error as seen in the video.

kidinov commented 1 week ago

@AnirudhBhat

the onboarding page throws some error.

The web page throws an error? What error?

AnirudhBhat commented 6 days ago

The web page throws an error? What error?

You can see it here (second video from tablet).

"Data layer message channel was not initialised within 1000ms"

kidinov commented 6 days ago

@AnirudhBhat, Oh, I see. it looks like that tablet has some issues with the connection

kidinov commented 6 days ago

@AnirudhBhat could you please go through the checklist?