Open Bug 1243568 Opened 4 years ago Updated 1 year ago

Youdao Cloud Note explicitly bans Firefox from using its web version

Categories

(Web Compatibility :: Desktop, defect, P1)

defect

Tracking

(Not tracked)

People

(Reporter: xidorn, Unassigned)

References

()

Details

(Keywords: webcompat:needs-diagnosis, Whiteboard: [country-zh] [needsdiagnosis])

Attachments

(3 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.

You need to log in before you can comment on or make changes to this bug.