You are here

Starting another link in the already running instance of firefox

28 posts / 0 new
Last post
randyrant
Offline
Last seen: 6 years 10 months ago
Joined: 2015-10-17 08:51
Starting another link in the already running instance of firefox

I'd like to start a link in an already running instance of Firefox (no new Firefox window!). This used to work until 40.0.3 (e.g. with "start firefoxportable.exe [url]" from cmd.exe). The URL would open in the existing (open) instance of Firefox, everything fine.

Starting with 41.0 I receive the following error: "Another instance of Firefox is already running. Please...", using the same command. This new behavior breaks a lot of my aliases.

How would I return to the old behavior with the new launcher?

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Works if you start all with FirefoxPortable.exe

You can do it just fine as long as every instance including the first is started via FirefoxPortable.exe. I just confirmed it works without issue.

Note that this does not apply if you're running a second instance (other version or other profile). In that case you need to use AllowMultipleInstances as outlined in readme.txt which we neither support nor recommend.

Sometimes, the impossible can become possible, if you're awesome!

OsakaWebbie
Offline
Last seen: 1 month 3 weeks ago
Joined: 2012-02-16 02:11
"Same here" plus additional observation

I have the same problem (I hadn't identified precisely which update caused it to break, but the timing fits). In my case I can guarantee that no other Firefox is installed (portable or otherwise), and I don't even know how to use more than one profile, so I'm pretty sure I don't have multiple ways of opening FF.

But I have discovered that if I leave the error popup up (just let it get buried behind other windows and ignore it), I can click on external links and they will open in my one-and-only FF instance just fine. But if I close the popup, the next time I click on a link, I get the popup again. That seems weird to me, but to someone who knows how this stuff works under the hood, perhaps it is a meaningful clue.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Different User Contexts

The only other thing I can think of is if one is started via your normal user and one is started via admin (which you should never ever do with a web browser).

Or if Windows messaging and mutexes are broken on your system. Out of curiosity, what's the full path to FirefoxPortable.exe?

Sometimes, the impossible can become possible, if you're awesome!

OsakaWebbie
Offline
Last seen: 1 month 3 weeks ago
Joined: 2012-02-16 02:11
Answers

No, I'm not starting anything as admin; I'm not doing anything differently than I always have.

I'm not sure what Windows messaging and mutexes are. But the full path is C:\AppsAndStuff\PortableApps\FirefoxPortable\FirefoxPortable.exe.

Hmm, in the process of looking this stuff up, I discovered a ghost. It appears likely to have been there for two years, so it's probably not related to the current issue, but it's mysterious. When I used the Start Menu to search for firefoxportable.exe, it showed two files with that name. One is the real one, with the normal icon, in a real place, with a real size. The other one has a size of either 0 or 159kB depending on which rumor you believe, and lives in a folder that doesn't exist (or Windows isn't showing me despite being set to display all files/folders including hidden ones - sometimes I miss the simpler era when computing was done on a Unix command line and it didn't lie to you about your file structure). See this collection of screenshots, which show the real folder, then the result of hovering over each filename, then the result of right-clicking and selecting Properties on each file. Sorry for the stuff you can't read - I have Japanese Windows - but the key points are clear.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Another firefox.exe

Is there another firefox.exe running anywhere on your system including running under another user account? Some other browsers based on Firefox claim to be able to run at the same time but will step all over Firefox so running at the same time isn't recommended.

You can also try this debug FirefoxPortable.exe launcher to see if the mutex is failing.

Sometimes, the impossible can become possible, if you're awesome!

OsakaWebbie
Offline
Last seen: 1 month 3 weeks ago
Joined: 2012-02-16 02:11
No other Firefox

No, there is only one user account on the machine, and the only instance of firefox.exe is the one in the app folder under the path I previously gave you (and a corresponding ghost one under the non-existent c:\portable folder). There is no other browser at all running. I occasionally run Chrome when I need something that doesn't have the same cookies, but I don't think I've used it in a month or more.

And don't forget that as long as I leave the error message open, it works fine - that quirky symptom should help someone figure this out. It would be great if randyrant could chime in and say whether that also makes it work in his case.

P.S. Are these comments just going to keep getting narrower and narrower as we converse? I wonder what it does when it runs out of space completely...

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Launcher Running

Leaving the error up means that FirefoxPortable.exe is already running from that locaiton... so the next launcher you start thinks it is starting a secondary instance from that original instance since it sees a phantom firefox.exe process running as well as the FirefoxPortable.exe process with the mutex.

Please try the debug launcher (just fixed the link) in place of your existing FirefoxPortable.exe to ensure the mutex is set.

Also, please run IsFirefoxRunning.exe so I can get a raw return from the FindProcDLL call. It'll just pop up a messagebox with the resulting number from the call.

Sometimes, the impossible can become possible, if you're awesome!

OsakaWebbie
Offline
Last seen: 1 month 3 weeks ago
Joined: 2012-02-16 02:11
Healed

I apparently don't understand your explanation of what happens when I leave the error message up, because it sounds like it would have the opposite effect, making it even less likely to obediently open the requested link.

But anyway, in my case it's moot now - I did a cold shutdown/restart, during which time Windows had piled up 66 of their little updates waiting for my approval, and when I started PortableApps back up, I let FirefoxPortable update to 41.0.2. Prior to the restart I had run a lot of memory-heavy programs (Adobe stuff), so my memory was probably tight, also. Anyway, either the restart or one of the updates seems to have fixed it, at least at the moment.

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
Hello John,

Hello John,

First of all thank you for your work.

Having just formatted (I am running Win7 x64, fully updated) and copied my portable Firefox from my old installation to the new one; I am facing the same issue as OsakaWebbie. There is no other installation of Firefox or a browser that uses it.

As Osaka said, the first time I click on a link from an external source (for example Thunderbird) I have this message pop up. Once the message has popped up if I do not close it, I can open up pages normally when clicking on links from external sources. So it's a bit strange.

I want to help you debug this if you are inclined to. So tell me the steps to use the above and I will let you know of the results. If it helps, we could even have a Skype screen sharing session.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Previous post

Please reboot first. Then try the instructions in the previous post. Your os is telling the launcher Firefox.exe is already running.

Sometimes, the impossible can become possible, if you're awesome!

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
When I run the portable

When I run the portable launcher, the isrunning utility returns 1 and when I close it it returns as 0 which is expected. The only thing I noticed is that with the debug version the problem does not always happen, but I doubt this is useful feedback. If you want me to perform any specific steps let me know.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Returns 0?

IsFirefoxRunning.exe should pop up a message box with a specific string. Please run this utility when you have no instances of Firefox Portable running and report the results.

Sometimes, the impossible can become possible, if you're awesome!

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
When no instance is running:

When no instance is running:

---------------------------
Mozilla Firefox, Portable Edition | PortableApps.com
---------------------------
FindProcDLL::FindProc "firefox.exe" reports: 0
---------------------------
OK
---------------------------

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
Any updates?

Hello there,

Any updates on this?

Let me know if you need anything.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Check Association

To ensure nothing is wrong with the association, boot your computer fresh. Ensure nothing at all is running. Run FirefoxPortable.exe directly within Windows Explorer. Once it is running, switch back to Windows Explorer. Drag help.html onto FirefoxPortable.exe and release. This should open the help file within the already running instance of Firefox Portable. If it does not, try it with a completely fresh install of Firefox Portable with zero changes at all. If that fails, something is more deeply wrong with your Windows install.

Sometimes, the impossible can become possible, if you're awesome!

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
Dragging the page into the

Dragging the page into the firefox window works correctly. The problem occurs when I click a link in Thunderbird, or an external application tries to open a link.

Probably this has to do with the fact that I've registered firefox portable to be my default browser and something not working well there. I've done that using the RegisterFirefoxPortable.exe application.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not Suported

I'm unfamiliar with that application and unsure how it "registers" FirefoxPortable.exe. It's not an official release. It's likely not doing it correctly.

Sometimes, the impossible can become possible, if you're awesome!

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 1 month ago
Developer
Joined: 2010-02-13 17:10
yu referring

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
Yes

Yes, that's the one. It had worked fine for my previous Win7 installation.

Edit: Actually my version seems newer from the one in the screenshot. Developed in 2010.

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 1 month ago
Developer
Joined: 2010-02-13 17:10
Still not one of our apps

Sorry

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Closed Source

It's also closed source, so we can't even analyze what it does to be sure.

Sometimes, the impossible can become possible, if you're awesome!

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
My initial contact with you

My initial contact with you was because I thought there was a bug somewhere in the launcher. I may investigate this further and let you know if I find anything.

Thank you for your answers.

OsakaWebbie
Offline
Last seen: 1 month 3 weeks ago
Joined: 2012-02-16 02:11
For me, apparently memory related

After awhile of it behaving, my computer started doing this again. At the same time I was having a different problem that appeared to be related to a shortage of memory, so I rebooted. Both problems went away. So @acicovic, in your case does it get well after a reboot?

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
Hi OsakaWebbie,

Hi OsakaWebbie,

Thank you for your answer. Whether I have 75% free or 20% free memory, the issue persists. I think that what happened to you is a coincidence as I cannot see how a memory issue can create that behavior. However, I'm glad that the reboot worked for you! Smile

acicovic
Offline
Last seen: 4 months 3 weeks ago
Joined: 2015-11-05 02:43
Fixed

I was able to fix this.

As I am using junction points (symbolic links) on my system, I was able to access the launcher from two places "C:\Program Files\etc...\" and "D:\Program Files\etc...\". The problem was that my Desktop shortcut was pointing to D: while I had set my registry keys for default browser as C:

So Running from D: location from my shortcut and then trying opening links using C: location (as default URL handler), obviously made Firefox think that I was trying to run another instance although it was the same one. That's the only way I can explain it.

So if you get this error, make sure that the paths you're running from are all the same. By the way the RegisterFirefoxPortable.exe works fine and it had nothing to do with the problem.

iiiyraegr
Offline
Last seen: 8 years 6 months ago
Joined: 2016-05-18 15:42
Clarificaton please

I'm not sure if this is the same question the OP is asking, but here it is: I've installed FirefoxPortable 46.0.1 at C:\FirefoxPortable1 in Windows 10. If I enter

C:\FirefoxPortable1\FirefoxPortable.exe

at any command prompt, FirefoxPortable starts. If I then enter the same command a second time, I get the error message

Firefox is already running, but is not responding. The old Firefox process must be closed to open a new window.

This is different from the non-Portable Firefox, which allows me to launch it (new windows) an unlimited number of times from command prompts. Is this difference to be expected? If so, is there any way to launch the same PortableFirefox.exe more than once from command lines?

Thanks

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 22 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Other Firefox running, Multiple Instances set?

Do you have another instance of Firefox running, AllowMultipleInstances set to true in the FirefoxPortable.ini or did you launch with -no-remote as a command line? This kills the ability to launching it a second time from an external process.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments