Closed Bug 1243568 Opened 8 years ago Closed 3 years ago

Youdao Cloud Note explicitly bans Firefox from using its web version

Categories

(Web Compatibility :: Site Reports, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: xidorn, Unassigned)

References

()

Details

(Keywords: webcompat:contact-ready, Whiteboard: [country-zh] [needsdiagnosis])

Attachments

(4 files)

Youdao Cloud Note is a Chinese online notebook service like Evernote, developed by NetEase. Its web application explicitly says Firefox is not supported and suggest users to use Chrome instead. (You need to login to see that notification.)

Changing the user-agent string to Chrome enables accessing its interface, but it doesn't work as expected. I can see multiple
> TypeError: this.selection is null
message in the web console. I tried to dig a bit into the source code, but didn't find the reason why this happens.

There is no significant issue on the UI as far as I can tell. (And it seems that it even uses some -moz- prefixed properties.) But the editor completely doesn't work, likely due to the error above.

I may be worth to dig a bit further to see what makes it broken on Firefox, so that we know what can we do.
Assuming accounts are free - could someone register a test account and send me the details? I can have a look, but from experience I know it's very complicated to set up a test account on a site you don't understand :)
Here is my steps to access the youdao cloud note on my mac firefox 47:
1. go to http://note.youdao.com/
2. Switch my user agent to
    Mac OS X/ Safari: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
3. Click the blue button "login to web version"
4. I choose to use wechat login (second one on right-hand side)
5. Use my wechat app to scan the QR code, login done

I can try later to see in different combination will happen. Any idea, hallvord?
So, now we have a browser block screen *before* login. The interesting issue is whether editing a note now works if you are logged in in Firefox with a spoofed UA string. Can you test that, Eric?
Flags: needinfo?(etsai)
xidorn: I don't see the error message "TypeError: this.selection is null" after switch user agent. I will try to outreach youdao if they can remove the blocking screen for firefox.
Flags: needinfo?(etsai)
Flags: needinfo?(bugzilla)
Attached image screenshot
It isn't possible for me to either view or edit any note after login (with switched user agent), and I can still see that error message in the console (see the attached screenshot).
Flags: needinfo?(bugzilla)
Whiteboard: country-zh
Switching to needsdiagnosis as we clearly need to go deeper into this. Probably only Xidorn or Eric can dive deeper. 

Though ni :miketaylr on it, as we are coming to Taipei in October. A sharing keyboard session could do it probably to dig into the code.
Flags: needinfo?(miket)
Whiteboard: country-zh → [country-zh] [needsdiagnosis]
Added an agenda item to look at this in Taipei.

https://wiki.mozilla.org/Compatibility/Meetings/2016-10-work-week#Co-debugging_Chinese_bugs
Flags: needinfo?(miket)
Takes time on this bug, here is some code snippets I found may related:

I use wechat app to login, with one empty note. Modify note title works in Firefox with Chrome UA.

But when I try to enter words, it shows ReferenceError: event is not defined in https://note.youdao.com/editor/collab/bulbeditor/bulb.min.e8361273.js
According to the backtrace, I think _onKeyDown calls _isMatch, but is_Match requires event from _onKeyDown

      _isMatch : function(object, item) {
        return item && event ? _.every(attrs, function(key) {
          return item[key] === object[key];
        }) && test.isMatch(item.key, object.keyCode) : false;
      },

      _onKeyDown : function(event) {
        var passedValues;
        var c;
        var options = this;
        // Skipped
        _.each(which, function(o, i) {
          if (options._isMatch(b, o.keyInfo)) {
            passedValues[i] = o;

Not sure if Chrome allow callee uses variable from caller, so Chrome won't throw ReferenceError?
Chrome probably has the nonstandard window.event which returns the same event object as that passed in the event handler. I believe Gecko doesn't support that attribute.
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #9)
> Chrome probably has the nonstandard window.event which returns the same
> event object as that passed in the event handler. I believe Gecko doesn't
> support that attribute.

Yep, this is correct (for now, anyways).

They would need to pass in the event object from _onKeyDown into their _isMatch method, otherwise we'll hit the ReferenceError at "return item && event...".
Depends on: 218415
About this.selection is null, I can reproduce this issue:
1. Create a note from previous youdao cloud note, keep it empty
2. Login http://note.youdao.com/web with Chrome UA
3. Switch to the note created in step 1.

It's in editor/view/EditorView object, when try to exec command "applyInlineStyle". But I guess it's not the problem makes this note not usable.
With current nightly (57a 2017.8.30), under Chrome UA (switched by agentx extension), note.youdao.com can login in successfully, and edit note BUT can't save the note, you will eventually lost any modification.
More specifically, the Cloud note will show ‘saved’ but none of edition is actually saved. The following is what I get from console:

[code]
["add",{"textareas":[],"contenteditables":[],"iframes":[],"htmlghosts":[]}]
bundle.js:8321:29
指向“https://hm.baidu.com/hm.js?4566b2fb63e326de8f2b8ceb1ec367f2”的 <script> 加载失败。
web:1
XML 解析错误:找不到根元素
位置:https://note.youdao.com/login/acc/pe/getsess?product=YNOTE
行 1,列 1:
getsess:1:1
所用的 getPreventDefault() 已不赞成使用。请改用 defaultPrevented。
d47a29f4.index.js:3:23411
pomelo disconnet
d47a29f4.index.js:21:23771
指向“https://gorgon.youdao.com/gorgon/request.s?udid=vbchk4CNa59cBa9GKSQNH1UA85j4sQrz&id=57e67c000e378d1858b8067ce0152219&ct=2&MAGIC_NO=0&reqfrom=web&webos=6&nsv=1.0.5&ran=1&callback=_yad_jsonp_0&_1504058540937”的 <script> 加载失败。
web:1
所用的 getPreventDefault() 已不赞成使用。请改用 defaultPrevented。
d47a29f4.index.js:3:23411
TypeError: document.caretRangeFromPoint is not a function
[详细了解]
bulb.min.cf445da1.js:12:29305
ReferenceError: event is not defined
[详细了解]
[/code]
Sergiu, can you re-test the STR in Comment #11?
Flags: needinfo?(sergiu.logigan)
Priority: -- → P1
Attached image Console.png
Console screenshot from Nightly 61, after successful login.
Flags: needinfo?(sergiu.logigan)
I am, however, receiving an Unsupported Browser message, when the following STR are followed:

1. Switch to Chrome UA.
2. Navigate to https://note.youdao.com/
3. Click the 使用网页版 button (http://prntscr.com/j5tjg2)
4. Login using valid credentials.
5. Switch to Default UA.
6. Refresh.

This is the message displayed:
http://prntscr.com/j5tk45

Message reads:
"YouDao Cloud Note

We're sorry, your browser is unable to use the new CloudDoc feature

you can:

Download using the latest Dodge Cloud Notes client;

Download the latest version of Chrome browser to use;

You can also use this feature with the latest version of 360 Browser, Sogou Browser, and the Extreme (High) Speed Mode of the Cheetah Browser.
<Go to old version> <Back to official website>"

The "Old Version" is compatible with Firefox.

Tested on Windows 10 and Nightly 61.
Attached image browser differences.jpg
This is the difference between Chrome (or Chrome UA) and Firefox, on the homepage (https://note.youdao.com/)
Comment 13 seems to indicate window.event (bug 218415) was a problem. Sergiu, would you mind re-testing with the latest nightly?
Flags: needinfo?(sergiu.logigan)
Accessing http://note.youdao.com/web/ redirects to https://note.youdao.com/web/unsupport.html which translates into:

"YouDao Cloud Note
Sorry, your browser is not able to use the new features of the cloud note
you can:
Download and use the latest Taoyun note client;
Download the latest version of the Chrome browser to use;
You can also use this feature in the latest version of the 360 browser, Sogou browser, and the cheetah browser's extreme (high) speed mode.
You can use this feature with the Chrome browser or Safari browser.
Go to the old version, return to the official website
     Netease Home
     |
     Have a home page
     |
     YouDao Cloud Note
     |
     About the road
©2016 Netease Company Beijing ICP Certificate No. 080268"

Performing the STR in Comment 16, leads to the same error page being displayed, so this issue is still reproducible.
Flags: needinfo?(sergiu.logigan)
Product: Tech Evangelism → Web Compatibility

See bug 1547409. Moving webcompat whiteboard tags to keywords.

This is the script redirecting.

        var ua = navigator.userAgent;
        if (ua.toLowerCase().indexOf('applewebkit') < 0) {
            location.href = '/web/unsupport.html';
        }

in Comment #16, why doing the

  1. Switch to Default UA.

to see what is not working, we need to stay with the chrome user agent.
sergiu, does it work when keeping chrome ua?

Flags: needinfo?(sergiu.logigan)
Attached image Screenshot_1.png

It kinda works, but you can only type characters. Space, Enter etc are not working, even if the Chreme UA is active.

Flags: needinfo?(sergiu.logigan)

Sergiu, can you re-test after flipping these 2 prefs to false (one by one, so we can know which one (if any) had an effect):

dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value
dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content

Flags: needinfo?(sergiu.logigan)

Sure thing!

I have retested this and the behavior does not change with both prefs set to False (either one by one, or both at the same time).

Flags: needinfo?(sergiu.logigan)

OK, thanks!

Re-reading the comments here. I'm not sure we can do a lot about this.
Because they made the choice to design the app for chrome only. They know it (they have a message explicitly requesting chrome).
We could contact them to tell "Hey make it usable on Firefox" but I'm pretty sure that would not changed a dime.

Xidorn, if you feel contacting them that would be greatly appreciated, but I don't think there is anything we can do at this stage.
Closing as WONTFIX?

Flags: needinfo?(xidorn+moz)
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(xidorn+moz)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: