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

bugfix/ajax #2023

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

EArminjon
Copy link
Contributor

@EArminjon EArminjon commented Feb 15, 2024

Connection with issue(s)

Some Ajax calls are intercepted and broken.

I got an issue on iOS where some ajax call made by iframes were not working. On Android these iframes are well working.
Hard to share something because it didn't produce any logs...

After comparing your iOS and Android implementation I saw a difference in code. I copy and paste so the same logic done in Android into iOS and magic, it's works !

The logic that I took from Android for iOS :

var w = (window.top == null || window.top === window) ? window : window.top;
w.FLAG_VARIABLE_FOR_SHOULD_INTERCEPT_AJAX_REQUEST_JS_SOURCE

Testing and Review Notes

Screenshots or Videos

To Do

  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • request the "UX" team perform a design review (if/when applicable)

@EArminjon
Copy link
Contributor Author

EArminjon commented Mar 14, 2024

@pichillilorenzo please check :)

We use this PR in production since its opening, it works well.

@nicks258
Copy link

nicks258 commented Jul 19, 2024

@EArminjon How can I use your branch to build my app. because when I try to use I get an error PlatformWebViewEnvironmentCreationParam not found in webview_environment.dart.
I tried to add as

flutter_inappwebview:
  git:
      url: 'https://github.com/EArminjon/flutter_inappwebview.git'
      path: 'flutter_inappwebview'
      ref: 'master'

@EArminjon
Copy link
Contributor Author

EArminjon commented Jul 19, 2024

@EArminjon How can I use your branch to build my app. because when I try to use I get an error PlatformWebViewEnvironmentCreationParam not found in webview_environment.dart. I tried to add as

flutter_inappwebview:
  git:
      url: 'https://github.com/EArminjon/flutter_inappwebview.git'
      path: 'flutter_inappwebview'
      ref: 'master'

Your issue is not linked to my PR. Clear your cache, pub-cache etc.

@nicks258
Copy link

@EArminjon How can I use your branch to build my app. because when I try to use I get an error PlatformWebViewEnvironmentCreationParam not found in webview_environment.dart. I tried to add as

flutter_inappwebview:
  git:
      url: 'https://github.com/EArminjon/flutter_inappwebview.git'
      path: 'flutter_inappwebview'
      ref: 'master'

Your issue is not linked to my PR. Clear your cache, pub-cache etc.

Yeah, I tried everything but still, it gives me the same error. Can you please check if Am I adding your branch correctly in pubspec.yaml

@EArminjon
Copy link
Contributor Author

You can base your pubspec on the pr commit instead.

@nicks258
Copy link

If you don't mind can you share your pubspec part of adding flutter_inappwebview?

@EArminjon
Copy link
Contributor Author

EArminjon commented Jul 19, 2024

I use a custom bitbucket repo with multiple PR merged inside. I can't share.

I believe something like that should work : (this use the PR commit)

flutter_inappwebview:
    git:
      url: https://github.com/pichillilorenzo/flutter_inappwebview.git
      ref: c4dfe6d0f64c64bf645d664711675ed5dcee2944

@nicks258
Copy link

@EArminjon @pichillilorenzo But It needs to pass the path also right? without that it gives an error
Could not find a file named "pubspec.yaml" in https://github.com/EArminjon/flutter_inappwebview.git c4dfe6d0f64c64bf645d664711675ed5dcee2944.
And once I pass the path it starts giving error

../../AppData/Local/Pub/Cache/git/flutter_inappwebview-c4dfe6d0f64c64bf645d664711675ed5dcee2944/flutter_inappwebview/lib/src/webview_environment/webview_environment.dart:12:14: Error: Type 'PlatformWebViewEnvironmentCreationParams' not found.
    required PlatformWebViewEnvironmentCreationParams params,

@EArminjon
Copy link
Contributor Author

EArminjon commented Jul 22, 2024

@EArminjon @pichillilorenzo But It needs to pass the path also right? without that it gives an error
Could not find a file named "pubspec.yaml" in https://github.com/EArminjon/flutter_inappwebview.git c4dfe6d0f64c64bf645d664711675ed5dcee2944.
And once I pass the path it starts giving error

../../AppData/Local/Pub/Cache/git/flutter_inappwebview-c4dfe6d0f64c64bf645d664711675ed5dcee2944/flutter_inappwebview/lib/src/webview_environment/webview_environment.dart:12:14: Error: Type 'PlatformWebViewEnvironmentCreationParams' not found.
    required PlatformWebViewEnvironmentCreationParams params,

Check again my quote code, I didn't use the same repo ;)

@nicks258
Copy link

@EArminjon Thanks for the prompt reply But I am using your branch like this

flutter_inappwebview:
  git:
    url: https://github.com/EArminjon/flutter_inappwebview.git
    path: 'flutter_inappwebview'
    ref: c4dfe6d0f64c64bf645d664711675ed5dcee2944

this gives me an error when I try to build

../../AppData/Local/Pub/Cache/git/flutter_inappwebview-c4dfe6d0f64c64bf645d664711675ed5dcee2944/flutter_inappwebview/lib/src/webview_environment/webview_environment.dart:12:14: Error: Type 'PlatformWebViewEnvironmentCreationParams' not found.
    required PlatformWebViewEnvironmentCreationParams params,

@EArminjon
Copy link
Contributor Author

@EArminjon Thanks for the prompt reply But I am using your branch like this

flutter_inappwebview:
  git:
    url: https://github.com/EArminjon/flutter_inappwebview.git
    path: 'flutter_inappwebview'
    ref: c4dfe6d0f64c64bf645d664711675ed5dcee2944

this gives me an error when I try to build

../../AppData/Local/Pub/Cache/git/flutter_inappwebview-c4dfe6d0f64c64bf645d664711675ed5dcee2944/flutter_inappwebview/lib/src/webview_environment/webview_environment.dart:12:14: Error: Type 'PlatformWebViewEnvironmentCreationParams' not found.
    required PlatformWebViewEnvironmentCreationParams params,

Check my example, I didn't use my repo.

@nicks258
Copy link

Yeah I tried with both even with @pichillilorenzo repo also I am getting the same error Using this as

flutter_inappwebview:
   git:
     url: https://github.com/pichillilorenzo/flutter_inappwebview.git
     ref: c4dfe6d0f64c64bf645d664711675ed5dcee2944
     path: 'flutter_inappwebview'

Getting the same error

../../AppData/Local/Pub/Cache/git/flutter_inappwebview-c4dfe6d0f64c64bf645d664711675ed5dcee2944/flutter_inappwebview/lib/src/webview_environment/webview_environment.dart:12:14: Error: Type 'PlatformWebViewEnvironmentCreationParams' not found.
    required PlatformWebViewEnvironmentCreationParams params,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../AppData/Local/Pub/Cache/git/flutter_inappwebview-c4dfe6d0f64c64bf645d664711675ed5dcee2944/flutter_inappwebview/lib/src/webview_environment/webview_environment.dart:19:9: Error: Type 'PlatformWebViewEnvironment' not found.
  final PlatformWebViewEnvironment platform;

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

Successfully merging this pull request may close these issues.

2 participants