yoichiro / chromeos-filesystem-dropbox

This software provides an ability to access Dropbox for ChromeOS.
https://chrome.google.com/webstore/detail/file-system-for-dropbox/hlffpaajmfllggclnjppbblobdhokjhe
BSD 3-Clause "New" or "Revised" License
79 stars 23 forks source link

Failed to mount: authorization page could not be loaded #120

Closed codeofdusk closed 4 years ago

codeofdusk commented 4 years ago

STR:

  1. Open Filesystem for Dropbox
  2. Select "mount your Dropbox"

Expected behavior: authorization page opens. Observed behavior: the following error is displayed: "Failed to mount: authorization page could not be loaded".

Running latest app version from Chrome Web Store, Chrome OS version 79.0.3945 on a Pixelbook.

schultzter commented 4 years ago

Same issue on HP Chromebook 14 Version 79.0.3945.86 (Official Build) (64-bit)

schultzter commented 4 years ago

Duplicates include #99 #98 and #103

yoichiro commented 4 years ago

Hi guys, thank you for the reporting. I could confirm this behavior. I'm currently investigating this issue. As workaround, the authorization window will be opened after clicking mount button continuously.

mherman95 commented 4 years ago

Thank you.

rdcowan commented 4 years ago

Thank you so much Yoichiro! Your ChromeOS extension for Dropbox is EXCELLENT!

It has been difficult without it working...

Robert

-------Original Message------- From: Yoichiro Tanaka notifications@github.com To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120) Sent: Jan 04 '20 7:08am

Hi guys, thank you for the reporting. I could confirm this behavior. I'm currently investigating this issue. As workaround, the authorization window will be opened after clicking mount button continuously.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rdcowan commented 4 years ago

The workaround did not work for me. I still can't access my Dropbox files from the Files App.

Robert

-------Original Message------- From: mherman95 notifications@github.com To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120) Sent: Jan 04 '20 10:30am

Thank you.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

yoichiro commented 4 years ago

The workaround did not work for me. I still can't access my Dropbox files from the Files App.

@rdcowan Thank you for the reporting. Hmm... In my pixelbook, the authorization window was opened sometimes after continuous pressing. However, I know that it is not a right solution. I need to find the reason.

Last night, I investigated this issue. But, I could not get any information to solve this issue, because my ChromeOS returned only the message "authorization page could not be loaded".

I intend to consult Google about this issue after a few days...

Falcon124 commented 4 years ago

Hi Yoichiro, I tried the "continuous press" method on the "Mount your Dropbox" button along with "Press as often as possible" method but neither worked on my Acer Chromebook (running Chrome OS 79.0.3945.86 (Official Build) (64 bit)).

Thanks for looking into the issue & hopefully it can get resolved soon as I'm keen to get the file system up & running again on this new machine :)

rdcowan commented 4 years ago

Thank you so much Yoichiro. We all appreciate your efforts and expertise.

Robert

-------Original Message------- From: Yoichiro Tanaka notifications@github.com To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: Robert Cowan rdcowan@cowan.us, Mention mention@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120) Sent: Jan 04 '20 8:53pm

The workaround did not work for me. I still can't access my Dropbox files from the Files App.

@rdcowan Thank you for the reporting. Hmm... In my pixelbook, the authorization window was opened sometimes after continuous pressing. However, I know that it is not a right solution. I need to find the reason.

Last night, I investigated this issue. But, I could not get any information to solve this issue, because my ChromeOS returned only the message "authorization page could not be loaded".

I intend to consult Google about this issue after a few days...

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

yoichiro commented 4 years ago

I have some questions about this issue for all users.

I hope that I can get more information as possible.

Falcon124 commented 4 years ago

The mount process worked fine for me on my previous Chromebook when I first set it up back in December 2018. It kept working fine with the existing mount despite ChromeOS automatically updating to the latest stable version. I have since given that Chromebook to my mother to replace her dead Macbook (she's not using Dropbox).

This new Chromebook I've purchased is running the latest version but has the problem whenever I try to run the Mount process.

I suspect that if a user's Dropbox file system was already mounted, it keeps going OK even with the latest version. The problem appears to only be for those of us configuring new mounts but should work fine on previously mounted Dropbox filesystems.

rdcowan commented 4 years ago

My problem started before Version 79. Probably 78. I checked my 'Connected Apps' on the Dropbox site and the ChromeOS Files Extension is not listed.

Could this be a Dropbox Update Issue?

-------Original Message------- From: Yoichiro Tanaka notifications@github.com To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: Robert Cowan rdcowan@cowan.us, Mention mention@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120) Sent: Jan 04 '20 11:21pm

I have some questions about this issue for all users.

* When did you notice this issue? After Chrome OS version 79? Or,

before than the 79?

I hope that I can get more information as possible.

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

mherman95 commented 4 years ago

My issue was exactly like Falcon's. My old Chromebook still has the extension working just fine but it has been mounted for over a year. I set up a new Chromebook a week before Christmas (I believe version 79) and it has the issues.

Matt Herman


From: Falcon124 notifications@github.com Sent: Sunday, January 5, 2020 12:15:25 AM To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: mherman95 mherman95@hotmail.com; Comment comment@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120)

The mount process worked fine for me on my previous Chromebook when I first set it up back in December 2018. It kept working fine with the existing mount despite ChromeOS automatically updating to the latest stable version. I have since given that Chromebook to my mother to replace her dead Macbook (she's not using Dropbox).

This new Chromebook I've purchased is running the latest version but has the problem whenever I try to run the Mount process.

I suspect that if a user's Dropbox file system was already mounted, it keeps going OK even with the latest version. The problem appears to only be for those of us configuring new mounts but should work fine on previously mounted Dropbox filesystems.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yoichiro/chromeos-filesystem-dropbox/issues/120?email_source=notifications&email_token=AOC3FMALB7QG3OZIT5XFIYLQ4F3H3A5CNFSM4J7ITPWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIDNGLQ#issuecomment-570872622, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOC3FMBAISSEJRL4ZT2EIALQ4F3H3ANCNFSM4J7ITPWA.

cface63 commented 4 years ago

Just got a new chromebook with the update of 79 already installed. Tried multiple times to mount and got the error messages. This makes me believe the update is the culprit.

Fatmitch commented 4 years ago

also having the same issue, thanks to everyone leaving comments before me, I think the solution is already being worked on. Thank you Yoichiro! Cant wait for the fix.

yoichiro commented 4 years ago

Thank you for guys' comments! I could recognize the situations.

yoichiro commented 4 years ago

Currently, I'm investigating why the authorization page can't be loaded.

At least, I have only the error message "Authorization page could not be loaded.". That is, I don't have any other information which can use to solve this issue. Becuase, the "chrome.identity" API returns the error message only. I can't know the actual situation about what was happened in the API process.

But, I have started watching the source code of the Chromium OS. I thought that I might find the cause, if I can find the code which throws the error message.

The error message is defined at the following code:

https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/identity/identity_constants.cc?rcl=cdbdc966d5cf02bef5c555187d06a5199c105de5&l=20

const char kPageLoadFailure[] = "Authorization page could not be loaded.";

Next, I found the code where the kPageLoadFailure string is refered.

https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_function.cc?rcl=cdbdc966d5cf02bef5c555187d06a5199c105de5&l=79

void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure(
    WebAuthFlow::Failure failure) {
  switch (failure) {
    case WebAuthFlow::WINDOW_CLOSED:
      error_ = identity_constants::kUserRejected;
      break;
    case WebAuthFlow::INTERACTION_REQUIRED:
      error_ = identity_constants::kInteractionRequired;
      break;
    case WebAuthFlow::LOAD_FAILED:
      error_ = identity_constants::kPageLoadFailure;
      break;
    default:
      NOTREACHED() << "Unexpected error from web auth flow: " << failure;
      error_ = identity_constants::kInvalidRedirect;
      break;
  }
  SendResponse(false);
  if (auth_flow_)
    auth_flow_.release()->DetachDelegateAndDelete();
  Release();  // Balanced in RunAsync.
}

As like the code above, the error message is thrown when the failure variable becomes the WebAuthFlow::LOAD_FAILED value. Furthermore, I found the code where calls the OnAuthFlowFailure function with the WebAuthFlow::LOAD_FAILED value.

https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/identity/web_auth_flow.cc?rcl=ee7ea7dcf43928ef64337d8857205fa4bb4b4c5f&l=244

void WebAuthFlow::DidFinishNavigation(
    content::NavigationHandle* navigation_handle) {
  bool failed = false;

  if (navigation_handle->GetNetErrorCode() != net::OK) {
    if (navigation_handle->GetURL().spec() == url::kAboutBlankURL) {
      DCHECK_EQ(net::ERR_UNKNOWN_URL_SCHEME,
                navigation_handle->GetNetErrorCode());
    } else {
      failed = true;
      TRACE_EVENT_ASYNC_STEP_PAST1("identity", "WebAuthFlow", this,
                                   "DidFinishNavigationFailure", "error_code",
                                   navigation_handle->GetNetErrorCode());
    }
  } else if (navigation_handle->IsInMainFrame() &&
             navigation_handle->GetResponseHeaders() &&
             navigation_handle->GetResponseHeaders()->response_code() >= 400) {
    failed = true;
    TRACE_EVENT_ASYNC_STEP_PAST1(
        "identity", "WebAuthFlow", this, "DidFinishNavigationFailure",
        "response_code",
        navigation_handle->GetResponseHeaders()->response_code());
  }

  if (failed && delegate_)
    delegate_->OnAuthFlowFailure(LOAD_FAILED);
}

By the code above, I know that the error is thrown when the failed variable becomes true. The conditions are the following:

As the result, I will be able to recognize the actual situation, if I can get the values of GetNetErrorCode() and response_code(). Fortunately, it seems that these values are the target of the trace logging with TRACE_EVENT_ASYNC_STEP_PAST1.

But, unfortunately, I don't know how to get the log output now. I got the system and user logs from the chrome://net-internals page, but I could not find those outputs.

Is there someone who know how to watch those trace log output?

yoichiro commented 4 years ago

When I watched the chrome://tracing log, I could find the trace log which was outputed by the TRACE_EVENT_ASYNC_STEP_PAST1 macro from the following code:

https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/identity/web_auth_flow.cc?rcl=ee7ea7dcf43928ef64337d8857205fa4bb4b4c5f&l=244

error_code = 18446744073709552000

EN32id1UUAA0WET

The error code value was overflowed over the max value (18446744073709551616) of the 64bit unsigned value. I found that the traced values are casted to int by some macros, but I don't know why the value was broken. Probably, there is possible that the actual value was lost. That is, I think that I could not the actual error code from the navigation_handle->GetNetErrorCode() code.

After investigating the chrome://tracing, I also saw other log chrome://net-export. I confirmed that the 200 HTTP status code was recorded as the response of the authorization page fetching, but I could not find any other information...

To get the correct error code, I need to build a Chromium OS which has debug codes I add. Last night, I tried to build it, but I could not do it because the build steps might be changed from I tried a few years ago...

mherman95 commented 4 years ago

Hitting the mount button repeatedly like you said before worked for me finally. You just have to do it constantly for like 10-15 seconds. It works just fine for me now.

Matt Herman


From: Yoichiro Tanaka notifications@github.com Sent: Sunday, January 12, 2020 6:42:28 PM To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: mherman95 mherman95@hotmail.com; Comment comment@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120)

When I watched the chrome://tracing log, I could find the trace log which was outputed by the TRACE_EVENT_ASYNC_STEP_PAST1 macro from the following code:

https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/identity/web_auth_flow.cc?rcl=ee7ea7dcf43928ef64337d8857205fa4bb4b4c5f&l=244

error_code = 18446744073709552000

[EN32id1UUAA0WET]https://user-images.githubusercontent.com/261787/72227045-5e095000-35db-11ea-9560-780c9b89551c.png

The error code value was overflowed over the max value (18446744073709551616) of the 64bit unsigned value. I found that the traced values are casted to int by some macros, but I don't know why the value was broken. Probably, there is possible that the actual value was lost. That is, I think that I could not the actual error code from the navigation_handle->GetNetErrorCode() code.

After investigating the chrome://tracing, I also saw other log chrome://net-export. I confirmed that the 200 HTTP status code was recorded as the response of the authorization page fetching, but I could not find any other information...

To get the correct error code, I need to build a Chromium OS which has debug codes I add. Last night, I tried to build it, but I could not do it because the build steps might be changed from I tried a few years ago...

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yoichiro/chromeos-filesystem-dropbox/issues/120?email_source=notifications&email_token=AOC3FMGO6BUMTDUHGGA7OGLQ5O2HJA5CNFSM4J7ITPWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXJCCA#issuecomment-573477128, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOC3FMCAJOW5SUFS6NXQP7TQ5O2HJANCNFSM4J7ITPWA.

rdcowan commented 4 years ago

It took me quite a bit longer (maybe 30 seconds) but mine finally worked as well.

Robert

-------Original Message------- From: mherman95 notifications@github.com To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: Robert Cowan rdcowan@cowan.us, Mention mention@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120) Sent: Jan 12 '20 7:15pm

Hitting the mount button repeatedly like you said before worked for me finally. You just have to do it constantly for like 10-15 seconds. It works just fine for me now.

Matt Herman


From: Yoichiro Tanaka notifications@github.com Sent: Sunday, January 12, 2020 6:42:28 PM To: yoichiro/chromeos-filesystem-dropbox chromeos-filesystem-dropbox@noreply.github.com Cc: mherman95 mherman95@hotmail.com; Comment comment@noreply.github.com Subject: Re: [yoichiro/chromeos-filesystem-dropbox] Failed to mount: authorization page could not be loaded (#120)

When I watched the chrome://tracing log, I could find the trace log which was outputed by the TRACE_EVENT_ASYNC_STEP_PAST1 macro from the following code:

https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/identity/web_auth_flow.cc?rcl=ee7ea7dcf43928ef64337d8857205fa4bb4b4c5f&l=244

error_code = 18446744073709552000

[EN32id1UUAA0WET]https://user-images.githubusercontent.com/261787/72227045-5e095000-35db-11ea-9560-780c9b89551c.png

The error code value was overflowed over the max value (18446744073709551616) of the 64bit unsigned value. I found that the traced values are casted to int by some macros, but I don't know why the value was broken. Probably, there is possible that the actual value was lost. That is, I think that I could not the actual error code from the navigation_handle->GetNetErrorCode() code.

After investigating the chrome://tracing, I also saw other log chrome://net-export. I confirmed that the 200 HTTP status code was recorded as the response of the authorization page fetching, but I could not find any other information...

To get the correct error code, I need to build a Chromium OS which has debug codes I add. Last night, I tried to build it, but I could not do it because the build steps might be changed from I tried a few years ago...

-- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yoichiro/chromeos-filesystem-dropbox/issues/120?email_source=notifications&email_token=AOC3FMGO6BUMTDUHGGA7OGLQ5O2HJA5CNFSM4J7ITPWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXJCCA#issuecomment-573477128, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOC3FMCAJOW5SUFS6NXQP7TQ5O2HJANCNFSM4J7ITPWA.

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Falcon124 commented 4 years ago

Clicking the button for about 30 seconds worked for me too. Every few seconds it would pop up the login window which would disappear soon after. Eventually one stayed open, allowing me to login, enter my 2 Factor Auth code and then approve the link. Huzzah! :)

Meanwhile, thanks to Yoichiro for documenting progress in assessing the issue. It's quite fascinating to follow the process :)

mtdeguzis commented 4 years ago

Bashing the mount button took me > 1 minute, but I eventually got the page as well.

4maself commented 4 years ago

An update for Chrome OS has fixed this issue for me (to build 79.0.3945.123). Maybe it'll be of use for others too.

Edit: nevermind. After a succesful login, I couldn't access my files and after a reboot I was logged out from File System for Dropbox and am back at this bug now.

Robin1j commented 4 years ago

Good morning;

I'm having the same problem with failure to mount on a new Asus Chromebook running 79.0.3945. 123.

Pressing the Mount button multiple times (50+) just produced a stream of the error message.

This will be a very useful tool once I get it running, so please let us know if there is anything we can do to help!

Thanks!

MikeCamel commented 4 years ago

Pixelbook, running 80.0.3987.67.

Dialog appears sometimes, but then disappears almost immediately.

theaulddubliner commented 4 years ago

As above, if I pound the mount button the login prompt eventually stays visible and eventually lets me mount.

Using the Google log-in caused the window to close.

insomniux commented 4 years ago

Here same on Lenovo C340-11. Tried to click 'Mount your Dropbox' for several minutes without succes. All apps are up to date, ChromeOS version 79.0.3945.123. Strange enough, I've installed it on a Lenovo C330 as well where I managed to mount dropbox after a few clicks.

yoichiro commented 4 years ago

Finally, I found the cause of this issue. As the result, this issue will be fixed at Chrome 82.

In the Dropbox authentication page (generally, it is called a Login Page), there is a ReCAPTCHA. The ReCAPTCHA uses