Opened 7 years ago

Closed 10 months ago

#9790 closed defect (worksforme)

The Torbutton startup observer component is sometimes not initialized

Reported by: gk Owned by: tbb-team
Priority: Very High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-torbutton
Cc: pde Actual Points:
Parent ID: #9809 Points:
Reviewer: Sponsor:


The symptoms of the problem is the info message: "While creating services from category 'profile-after-change', could not create service for entry 'StartupObserver', contract ID '@…/startup-observer;1'" It is quite difficult to reproduce. But the best step I have found so far is clicking on New Identity while loading a page (sounds strange, I know). Then even after closing and restarting Tor Browser the component is not initialized. One can "reset" that behavior surprisingly if one updates an extension (at least updating Torbutton solved the problem for me).

Child Tickets

Change History (7)

comment:1 Changed 7 years ago by gk

The interesting thing is this: The SSL Observatory code does not catch the exception which is happening due to missing ctypes. You ususally see something like

Error: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]
Source File: ~/tor-browser_en-US/Data/profile/extensions/
Line: 29

in the error console. However, I wrapped the whole startup observer component in a try-catch block to see what is happening and got:

Error: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: ~/tor-browser_en-US/Data/profile/extensions/ :: <TOP_LEVEL> :: line 29"  data: no]
Source File: ~/tor-browser_en-US/Data/profile/extensions/!/components/startup-observer.js
Line: 235

when the info message showed up in the error console.
This is pretty crazy and dangerous. Wrapping the offending SSL Observatory code in a try-catch-block might solve this bug. I am going to test that idea shortly.

comment:2 Changed 7 years ago by gk

Okay, catching the ctypes related exception seems to help. While I was not able to reproduce the bug reliably before catching the exception I did not manage to reproduce it at least once after catching it. This idea might be worth a try then...

comment:3 Changed 7 years ago by mikeperry

This really looks like the cause of #9763. Dupping that here. As a workaround, we will re-enable ctypes for the next 3.0alpha4 build (it was only disabled for them).

See also #9276, which we may just want to dup this bug to. Or maybe we just want to wrap the use of ctypes in the observatory in a try/catch for now and solve #9276 later (though #9276 should be relatively simple, I think?).

comment:4 Changed 7 years ago by mikeperry

Parent ID: #9809

comment:5 Changed 6 years ago by erinn

Component: TorBrowserButtonTor Browser
Keywords: tbb-torbutton added
Owner: changed from mikeperry to tbb-team

comment:6 Changed 3 years ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

comment:7 Changed 10 months ago by gk

Resolution: worksforme
Status: newclosed

I don't think this is an issue anymore.

Note: See TracTickets for help on using tickets.