dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.06k stars 1.56k forks source link

Check for running dartium (and close or prompt) on update #17713

Closed DartBot closed 9 years ago

DartBot commented 10 years ago

This issue was originally filed by brendandu...@gmail.com


What steps will reproduce the problem? When trying to launch my app in Dartium, I get the following error dialog:

Error Launching Application

Could not launch browser - process terminated while trying to connect. Try closing any running Dartium instances.:

Dartium stdout: [7144:8008:0322/000306:ERROR:component_loader.cc(138)] Failed to parse extension manifest.

[7144:8008:0322/000306:ERROR:component_loader.cc(138)] Failed to parse extension manifest.

[7144:8008:0322/000306:ERROR:component_loader.cc(138)] Failed to parse extension manifest.

[7144:8008:0322/000306:FATAL:simple_feature.cc(96)] Check failed: iter != mapping.end(). blessed_web_page

What is the expected output? What do you see instead? Not that.

What version of the product are you using? On what operating system? Dart Editor version 1.3.0.dev_05_02 (DEV) Windows 8.1

Please provide any additional information below.

DartBot commented 10 years ago

This comment was originally written by brendand...@gmail.com


Downloading a fresh install of the dev build from the website fixed the issue.

ricowind commented 10 years ago

It seems that the updating functionality in the editor is not completely safe in all cases.


cc @pq. cc @devoncarew. cc @whesse. Removed Priority-Unassigned label. Added Priority-High, Area-Editor, Accepted labels.

clayberg commented 10 years ago

Or something corrupted the environment. There really isn't anything here that suggests that the update process did not work. That could, of course, be the problem, but it could also be many other things. Assigning to Dartium in case the error messages mean anything.


Removed Area-Editor label. Added Area-Dartium label.

DartBot commented 10 years ago

This comment was originally written by cas...@gmail.com


Since I can't even run Dartium isolated, I think that the problem is there. Here is the complete log of when it fails to start.

================= Begin Activation Context Generation. Input Parameter:     Flags = 0     ProcessorArchitecture = Wow32     CultureFallBacks = en-US;en     ManifestPath = D:\Downloads\dart2\chromium\chrome.exe     AssemblyDirectory = D:\Downloads\dart2\chromium\     Application Config File =


INFO: Parsing Manifest File D:\Downloads\dart2\chromium\chrome.exe.     INFO: Manifest Definition Identity is (null).     INFO: Reference: 33.0.1750.48,language="*",type="win32",version="33.0.1750.48"     INFO: Reference: Microsoft.Windows.Common-Controls,language="*",processorArchitecture="*",publicKeyToken="6595b64144ccf1df",type="Win32",version="6.0.0.0" INFO: Resolving reference 33.0.1750.48,language="*",type="win32",version="33.0.1750.48".     INFO: Resolving reference for ProcessorArchitecture 33.0.1750.48,language="*",type="win32",version="33.0.1750.48".         INFO: Resolving reference for culture en-US.             INFO: Applying Binding Policy.                 INFO: No binding policy redirect found.             INFO: Begin assembly probing.                 INFO: Did not find the assembly in WinSxS.                 INFO: Did not find manifest for culture en-US.             INFO: End assembly probing.         INFO: Resolving reference for culture en.             INFO: Applying Binding Policy.                 INFO: No binding policy redirect found.             INFO: Begin assembly probing.                 INFO: Did not find the assembly in WinSxS.                 INFO: Did not find manifest for culture en.             INFO: End assembly probing.         INFO: Resolving reference for culture Neutral.             INFO: Applying Binding Policy.                 INFO: No binding policy redirect found.             INFO: Begin assembly probing.                 INFO: Did not find the assembly in WinSxS.                 INFO: Attempt to probe manifest at D:\Downloads\dart2\chromium\33.0.1750.48.DLL.                 INFO: Attempt to probe manifest at D:\Downloads\dart2\chromium\33.0.1750.48.MANIFEST.                 INFO: Attempt to probe manifest at D:\Downloads\dart2\chromium\33.0.1750.48\33.0.1750.48.DLL.                 INFO: Attempt to probe manifest at D:\Downloads\dart2\chromium\33.0.1750.48\33.0.1750.48.MANIFEST.                 INFO: Did not find manifest for culture Neutral.             INFO: End assembly probing.     ERROR: Cannot resolve reference 33.0.1750.48,language="*",type="win32",version="33.0.1750.48". ERROR: Activation Context generation failed. End Activation Context Generation.

What version of the product are you using? On what operating system? Dart Editor version 1.3.0.dev_05_02 (DEV) Dart SDK version 1.3.0-dev.5.2

Windows 7 - 64 bits

ricowind commented 10 years ago

Eric: The reason I suspect that this is due to the in place update by the editor is that multiple people are seeing this on this revision and that it seems to be fixed by a clean download. The fact that a clean download works suggested to me that when the editor updated (which includes dartium) something is not as consistent as a fresh download. The zip file that you download for a fresh install is the same that the editor downloads for updating. I still need to verify my claim above - I will try to do that monday (i.e., installing an older version of the system and updating - diffing that against a fresh install and figure out exactly what is triggering this).

Looking at the error message this could be left over files that does not match up (look at the info, it says chrome 33, we just moved to 34).

Another reason could be, that because dartium was open at the time where the update happened, the chrome.exe file was not updated - afterwards the load will not work because we updated to chrome 34.

No matter what it is, we should handle it gracefully.

DartBot commented 10 years ago

This comment was originally written by brendand...@gmail.com


I still have a copy of the old version that was updated, I'll see if I can do a diff tonight.

DartBot commented 10 years ago

This comment was originally written by cassiot...@gmail.com


I have downloaded the latest dev version and it works.

I believe that Rico's theory is right. There is a big chance that I had Dartium open while updating.

ricowind commented 10 years ago

OK, so I tried reproducing this, which is pretty straight forward: Download a two version old build of the editor: http://gsdview.appspot.com/dart-archive/channels/dev/release/33731/editor/ Extract Open the editor Open pop win sample Launch it in dartium Go back to the editor - don't close dartium Go to help, about editor, download and update the editor. After the editor installed the update try running sample again: we fail with the above error message

ricowind commented 10 years ago

Removed Area-Dartium label. Added Area-Editor label.

clayberg commented 10 years ago

Force Dartium to close prior to an update or cancel the update if Dartium is running?


Set owner to @pq. Added this to the 1.3 milestone.

ricowind commented 10 years ago

I think we need to be slightly more generic here. If we want the current update mechanism to stay like it is we should:   Make sure none of {dartium, dart} is running, if one of them is, ask the user to shut them down before continuing (we can't just close peoples dart processes forcefully, they could be running servers). We should validate that it is the process from within the current folder that is running, not just arbitrary dart/dartium processes (people may have a stable and dev channel download side by side)

I did have an alternative solution on my mind, basically downloading and extracting to a sub directory, pointing the DartEditor.exe at that DartEditor.exe - but there are still issues that could cause our users a bad experience here, since their command line testing tools would still be pointing at the old version of the tools until a time where the editor could clean up (as in move into the right location again, if non of {dart, dartium} is in use.

I think we should go with asking the user to close dart/dartium.

clayberg commented 10 years ago

Removed this from the 1.3 milestone. Added this to the 1.4 milestone.

kasperl commented 10 years ago

Removed this from the 1.4 milestone. Added this to the 1.5 milestone.

pq commented 10 years ago

Removed this from the 1.5 milestone. Added this to the 1.6 milestone.

pq commented 10 years ago

Changed the title to: "Check for running dartium (and close or prompt) on update".

pq commented 10 years ago

Keerti: I recall chatting about this but I can't remember the upshot. Did you have some thoughts on a cross-platform approach to detecting if dartium is running? We could certainly do it with a hack (well 3 hacks). Alternatively we could look at how javasysmon (https://github.com/jezhumble/javasysmon/wiki) does it, although I suspect they're doing the same sort of thing.


Set owner to @keertip. Added Triaged label.

keertip commented 10 years ago

Phil, can't recall what we decided on :). Have you had a chance to look at javasysmon? What do you think?


cc @pq.

sethladd commented 10 years ago

Let's detect that we failed to update, and try again. We don't want our users to work around this by doing a fresh download. Can we cache this download?


Set owner to @pq.

pq commented 10 years ago

Detecting a failed install is trickier than it sounds.

Seth: bounce back to me if you think we should dig in.


Set owner to @sethladd. Removed this from the 1.6 milestone. Removed Priority-High label. Added Priority-Medium label.