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

webview functionality issue - something went wrong #6876

Closed
dansachelarie opened this issue Nov 26, 2018 · 26 comments
Closed

webview functionality issue - something went wrong #6876

dansachelarie opened this issue Nov 26, 2018 · 26 comments
Labels

Comments

@dansachelarie
Copy link

dansachelarie commented Nov 26, 2018

NWJS Version :
I tried on window/linux with the latest nwjs version (0.34.5) just to load a page inside an webview (www.aa.com) and do a flight serch. It said "Something wrong happend" on the window/linux but in osx it is working. Also if I try in chrome it is working as expected, also tested on a nwjs window without webview and it is also working.

Expected behavior

The results of the search should appear.

Actual behavior

"Something wrong happend" message appear on the screen only on linux/window but in osx is working as expected.

How to reproduce

Just load that website (www.aa.com) in a webview and do a valid flight search.

@asteriosgr
Copy link

asteriosgr commented Nov 26, 2018

I can confirm.
Tested Versions: NW.js 0.34.1 + 0.34.5
Conditions of test: webview, Ubuntu x64

When visiting some websites within a webview using nwjs, is breaking some of the expected functionality. Taking a look at the issues described below can provide a better insight on the matter.

The first website is aa.com

Issue 1.

Behavior: 
Performing a search query at aa.com is resulting into a page where something went wrong

Expected behavior: 
A search query regarding flights and schedule should appear based on user’s options.

The second website is kayak.com

Issue 2.

Behavior:
Searching (click on search) for a hotel or to rent a car (anything other than flights), is not working. A page with a round cursor loading is presented. And then nothing.
Expected behavior:
The requested pages should open normally upon clicking on the link.

The third website is booking.com

Issue 3.
CARS.BOOKING.COM
Search button is not working.

@rogerwang
Copy link
Member

rogerwang commented Nov 26, 2018

Could you please try this latest build? It works well for me when load aa.com and search in a webview in windows.

https://dl.nwjs.io/live-build/nw35/11-26-2018/3a11b2178/v0.35.0/

@asteriosgr
Copy link

Thank you for your response. Your feedback is appreciated. However, that is why I explicitly stated the OS. In windows it is functioning properly. However, when trying Ubuntu I reproduce that.

@dansachelarie
Copy link
Author

dansachelarie commented Nov 26, 2018

I tested on windows with the latest version(nwjs 0.35.0) I can confirm that it works, but on linux it is not working, any idea why?

@rogerwang
Copy link
Member

I just tried on Linux with the latest build and it works for me too.

@asteriosgr
Copy link

Do you use the webview tag?

@rogerwang
Copy link
Member

That's sure and I'm using this sample:

<!DOCTYPE html>
<html>
  <head>
    <title>My App</title>
  </head>
  <body>
    <webview src="https://www.aa.com/"></webview>
  </body>
</html>

@asteriosgr
Copy link

This is mine:

<!DOCTYPE html>
<html>
  <head>
    <title>Test!</title>
  </head>
  <body>
	<webview style='position:absolute;height:800px;width:1200px' src="https://www.google.com"> </webview>
  </body>
</html>

@asteriosgr
Copy link

And when doing a search of any flight in aa.com for example, I get this:
image

@rogerwang
Copy link
Member

That error message is from the server, not NW.

@asteriosgr
Copy link

Yes however, it appears only when doing the search using nwjs+webview in Ubuntu 18.04. Also then check this:
image

Clicking on sign up with facebook or gmail is doing nothing for me.

@rogerwang
Copy link
Member

@asteriosgr I don't think there is anything wrong with the NW on the Ubuntu machine, maybe the server blocks the IP of that machine.

For the 2nd issue, when you try to sign up with Google chrome will open a new window. With webview I believe you need to handle this with the newwindow event: https://developer.chrome.com/apps/tags/webview#event-newwindow

And please report separate issues for different scenarios. That would make tracking clear.

@asteriosgr
Copy link

But if my IP was blocked I would not be able to use aa.com via chromium, firefox or any other browser. Only when accessing it via the webview of nwjs it is not loading.

Secondly, thank you for your consideration on the second issue. Yes now that you explained it I will try with the new window event. However, some issues still remain. I fixed my post above regarding issues and I removed those related to new window event.

@dansachelarie
Copy link
Author

@rogerwang I implemented the newwin event and even if I do so it is not working. What happens is that the page opened by kayak.com is staying in infinite loading and if I open the console it said: "The user agent does not support public key credentials" - this is why I think it is related to nwjs

@asteriosgr
Copy link

@dansachelarie this is another issue. And as I can see you track it here. #6875

Now regarding this topic. For me the something went wrong page is still appearing. And the search functionality of other websites is affected as well.

@dansachelarie
Copy link
Author

dansachelarie commented Nov 27, 2018

@rogerwang I also can confirm that the message displayed by @asteriosgr with "Something went wrong" is displayed only in the combination on nwjs + webview. In other browser it works from same pc. Also, I tried on electron + webview and it works.

@dansachelarie
Copy link
Author

@asteriosgr I know it is tracked on the other issue, but I think they are somehow related. Maybe the difference between kayak.com which remain in infinite loading screen and aa.com is that aa.com took into consideration the case when "The user agent does not support public key credentials" - and display that error page. Just a guess.

@dansachelarie
Copy link
Author

image

@rogerwang
Copy link
Member

In the original report, you referred to two sites: www.aa.com and www.aa.ro. Which one should I use trying to reproduce it? I tried aa.com and it works well for me under Linux with the latest build.

And in your test case posted in #6876 (comment) you are referring to www.google.com. It's very confusing ....

@rogerwang
Copy link
Member

And in your original report you said it breaks on both Windows and Linux, then later, both of you said it works on Windows: #6876 (comment)

Why is that happening? I'm wondering what changes on the Window machine...

@rogerwang
Copy link
Member

rogerwang commented Nov 27, 2018

@asteriosgr the blocking could be a combination of IP, cookies and user agent strings. It could be other reason as well. Anyway more information is needed to know why the server refuses your request.

@dansachelarie
Copy link
Author

@rogerwang sorry I edited my post, initially I tested on 0.34.5 because this is the stable version of nwjs. On that one the aa.com is not working on windows. In the 0.35.0 it is working on windows but not on linux. Any idea why? (no aa.ro, only aa.com)

@asteriosgr
Copy link

In the original report, you referred to two sites: www.aa.com and www.aa.ro. Which one should I use trying to reproduce it? I tried aa.com and it works well for me under Linux with the latest build.

And in your test case posted in #6876 (comment) you are referring to www.google.com. It's very confusing ....

Google is simple the front page. I type aa.com and visit the site.

@rogerwang
Copy link
Member

You could clean the user data directory and try again. And then try with nw --url=https://www.aa.com .

@dansachelarie
Copy link
Author

Let me resume it because I feel somehow that we are not on the same page.

  • I am trying to open https://www.aa.com inside an webview and it doesn't work (in a stable version on windows, but it works with the latest one on windows) None of those versions are working on linux. Why?

  • it is not related with the IP, pc or any other stuff because it is working in another browser

  • it is not related to the user data directory, I cleaned it and still same problem, also I am starting on incognito the nwjs

  • from my perspective there is something which is not working in webview; in order to test it I was doing a test on electron with webview and it works. So probably it is an issue regarding the way that nwjs is integrating webview tag. (in a normal nwjs window aa.com is working)

If you still need more information from me please let me know.

@stale
Copy link

stale bot commented Nov 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 28, 2019
@stale stale bot closed this as completed Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants