After 1.0.3 upgrade, clicking on Spotlight search results open in TextEdit not browser.

10 views
Skip to first unread message

Kunming Street

unread,
Oct 3, 2008, 2:23:28 PM10/3/08
to precipitate
I recently upgraded to 1.0.3 from 1.0.2, which worked great, on my
MacBook Pro (OS 10.5.5).

But now, when I click on Google Docs Spotlight search results, the
files open up as text files in TextEdit and not in my browser.

Has anyone else run into this? Is there something I can do to fix
this? I've tried deleting and reinstalling the precipitate preference
pane but get the same problem.

(Otherwise, this is a terrific application. It's completely changed
the way I use Google Docs, whose home page interface is still really
buggy. Keep up the good work!)

Stuart Morgan

unread,
Oct 3, 2008, 2:52:57 PM10/3/08
to precipitate
It sounds like either LaunchServices has lost track of Precipitate, or
it the OS didn't update the mapping of file extensions to types (the
UTI of the files changed between 1.0.2 and 1.0.3).

Does running the following in Terminal fix the problem?

/System/Library/Frameworks/CoreServices.framework/\
Versions/A/Frameworks/LaunchServices.framework/\
Versions/A/Support/lsregister -R\
~/Library/PreferencePanes\
/Library/PreferencePanes

Kunming Street

unread,
Oct 3, 2008, 3:15:38 PM10/3/08
to precipitate
Wow, thanks for the quick reply.

This is what I see after running what you wrote. I get more options.
The search results are still opening up in TextEdit.

Macintosh:~ xyz$ /System/Library/Frameworks/CoreServices.framework/\
> Versions/A/Frameworks/LaunchServices.framework/\
> Versions/A/Support/lsregister -R\
> ~/Library/PreferencePanes\
> /Library/PreferencePanes
lsregister: [OPTIONS] [ <path>... ]
[ -apps <domain>[,domain]... ]
[ -libs <domain>[,domain]... ]
[ -all <domain>[,domain]... ]

Paths are searched for applications to register with the Launch
Service database.
Valid domains are "system", "local", "network" and "user". Domains can
also
be specified using only the first letter.

-kill Reset the Launch Services database before doing anything
else
-seed If database isn't seeded, scan default locations for
applications and libraries to register
-lint Print information about plist errors while registering
bundles
-convert Register apps found in older LS database files
-lazy n Sleep for n seconds before registering/scanning
-r Recursive directory scan, do not recurse into packages or
invisible directories
-R Recursive directory scan, descending into packages and
invisible directories
-f force-update registration even if mod date is unchanged
-u unregister instead of register
-v Display progress information
-dump Display full database contents after registration
-h Display this help
Macintosh:~ xyz$

Stuart Morgan

unread,
Oct 3, 2008, 3:32:59 PM10/3/08
to precipitate
That output means it didn't actually run the command; it looks like
when you did the copy/paste the spaces at the beginning of the last
two lines got lost, so try this version instead:

Kunming Street

unread,
Oct 3, 2008, 5:29:19 PM10/3/08
to precipitate
Great, thanks. It looks like it ran this time because I got the
following output:

Macintosh:~ xyz$ /System/Library/Frameworks/CoreServices.framework/\
> Versions/A/Frameworks/LaunchServices.framework/\
> Versions/A/Support/lsregister -R \
> ~/Library/PreferencePanes \
> /Library/PreferencePanes
Macintosh:~ xyz$

Unfortunately, I still have the same problem, even after restarting
and forcing Spotlight to re-index my hard drive. (Incidentally, when I
restarted I was prompted to confirm that I wanted to install
Precipitate again.)

Any thoughts? Many thanks again for the help.

Stuart Morgan

unread,
Oct 3, 2008, 9:32:41 PM10/3/08
to precipitate
Hmm. The next thing to check would be to run:

mdls Library/Caches/Metadata/Precipitate/com.google.precipitate.\
GoogleDocsSource/*/* | grep -A 1 ContentTypeTree | \
sort | uniq -c | grep '"'

And post the output here, so I can see whether it's using the old
types or the new ones.

> (Incidentally, when I restarted I was prompted to confirm that I
> wanted to install Precipitate again.)

Could you explain that a bit more? What exactly did you do leading up
to being asked to install Precipitate again (I'm assuming that this is
the System Preferences dialog)?

Kunming Street

unread,
Oct 4, 2008, 1:13:33 AM10/4/08
to precipitate
Here's the output:

Macintosh:~ xyz$ mdls Library/Caches/Metadata/Precipitate/
com.google.precipitate.\
> GoogleDocsSource/*/* | grep -A 1 ContentTypeTree | \
> sort | uniq -c | grep '"'
667 "com.google.docs.document",
1 "com.google.docs.presentation",
30 "com.google.docs.spreadsheet",
7 "com.googlecode.precpitate.docs.pdf",
Macintosh:~ xyz$

The prompt I got was what I got the first time I clicked on the
precipitate preference pane the first time I installed it after just
downloading it. Something to the effect of: precipitate is an
application you downloaded from the Internet are you sure want to
install it? It stuck out to me because it came up as my computer was
starting up and I hadn't clicked on anything.

Kunming Street

unread,
Oct 4, 2008, 1:21:38 AM10/4/08
to precipitate
Just to clarify the second part of my last message: The prompt came up
after I rebooted soon after running the first Terminal instructions
you gave.

On Oct 4, 1:13 am, Kunming Street <kunmingstreet-goo...@yahoo.com>
wrote:

Stuart Morgan

unread,
Oct 4, 2008, 2:00:08 AM10/4/08
to precipitate
On Oct 3, 10:13 pm, Kunming Street <kunmingstreet-goo...@yahoo.com>
wrote:
>  667     "com.google.docs.document",
>    1     "com.google.docs.presentation",
>   30     "com.google.docs.spreadsheet",
>    7     "com.googlecode.precpitate.docs.pdf",

Yep, those are wrong (except for the PDFs, which never had an old
mapping since they are new with 1.0.3). For some reason, the OS isn't
picking up the new type mapping on your machine.

Unfortunately, it's almost impossible to figure out why exactly
LaunchServices does the wrong thing when it doesn't behave as
expected, so the best suggestion I can make is to rebuild your entire
LaunchServices database, then restart:

/System/Library/Frameworks/CoreServices.framework/Versions/A/\
Frameworks/LaunchServices.framework/Versions/A/Support/lsregister \
-kill -r -domain local -domain system -domain user

Once you've rebooted and Precipitate has started up again, you can run
the mdls command from before, and check that all four types start with
"com.googlecode.precpitate".

> The prompt I got was what I got the first time I clicked on the
> precipitate preference pane the first time I installed it after just
> downloading it. Something to the effect of: precipitate is an
> application you downloaded from the Internet are you sure want to
> install it? It stuck out to me because it came up as my computer was
> starting up and I hadn't clicked on anything.

That would be Apple's quarantine message asking for permission to run
(not install) the helper application that does the routine updating of
the local files, which starts automatically at login. That shouldn't
have come up though since you had previously allowed it to run. If
that happens every time you reboot, then the app is somehow not being
correctly marked as trusted by the OS, which might be related to the
issues LaunchServices is having in updating the type mapping (although
as I said, it's very hard to know with LaunchServices).

Stuart Morgan

unread,
Oct 4, 2008, 2:10:07 AM10/4/08
to precipitate
By the way, if you have any old copies of Precipitate lying around on
your drive you should make sure to throw them all away before
rebuilding your LS database, so that there are no copies of the old
mappings that might confuse it.

Kunming Street

unread,
Oct 4, 2008, 6:23:24 PM10/4/08
to precipitate
Woohoo! We're back in business.

The upshot is: after rebuilding my Launch Services database, things
appear to be back to normal. Clicking on Google Docs Spotlight search
results open in my browser.

But there were a couple of minor bumps along the way, which I've
outlined below. NB in particular that running the mdls command shows
that the type mappings are the same (i.e. start with
"com.google.docs.") but appear to change as I open documents.

Thanks again for the detailed help and patience! This is a really
useful piece of software that I've come to rely on. It's really useful
to be able to search for Google Docs no matter what program I'm in.

The details:

¶ I sent to Trash (but did not empty) old instances of precipitate on
my hard drive.

¶ I rebuilt the Launch Services database using the Terminal command
you gave.

¶ I rebooted.

¶ After rebooting I got the prompt again asking if it was okay to open
(not install like I wrote last time) precipitate.

¶ After Spotlight re-indexed my hard drive, I searched for a Google
Docs document. The first thing I noticed was that the icons for Google
Docs were back to the old icons. Previously, they had been displaying
as text file icons.

¶ Before I clicked on anything, I did a mdls command and got the
following, which seemed to indicate no change in the type mappings:

Macintosh:~ xyz$ mdls Library/Caches/Metadata/Precipitate/
com.google.precipitate.\
> GoogleDocsSource/*/* | grep -A 1 ContentTypeTree | \
> sort | uniq -c | grep '"'
667 "com.google.docs.document",
1 "com.google.docs.presentation",
30 "com.google.docs.spreadsheet",
7 "com.googlecode.precpitate.docs.pdf",

¶ I searched for a Google Docs document again and the first file I
clicked on opened up in TextEdit.

¶ I don't know if this made a difference but I emptied the Trash and
made Firefox my default browser again (it had been Safari for the past
week).

¶ I opened another document and this time it opened in Firefox. I
opened a couple more and they also opened in Firefox.

¶ I ran another mdls command in Terminal and got the following output:

Macintosh:~ xyz$ mdls Library/Caches/Metadata/Precipitate/
com.google.precipitate.\
> GoogleDocsSource/*/* | grep -A 1 ContentTypeTree | \
> sort | uniq -c | grep '"'
665 "com.google.docs.document",
1 "com.google.docs.presentation",
30 "com.google.docs.spreadsheet",
2 "com.googlecode.precpitate.docs.document",
7 "com.googlecode.precpitate.docs.pdf",

¶ I rebooted again.

¶ No precipitate prompt during startup.

¶ Launched Firefox.

¶ Opened another document and it opened in Firefox. I opened a few
more and they all opened in Firefox.

¶ Ran mdls command again and got the following output. Again, the type
mappings appeared to be changing as I opened up documents:

Macintosh:~ xyz$ mdls Library/Caches/Metadata/Precipitate/
com.google.precipitate.\
> GoogleDocsSource/*/* | grep -A 1 ContentTypeTree | \
> sort | uniq -c | grep '"'
659 "com.google.docs.document",
1 "com.google.docs.presentation",
30 "com.google.docs.spreadsheet",
8 "com.googlecode.precpitate.docs.document",
7 "com.googlecode.precpitate.docs.pdf",
Reply all
Reply to author
Forward
0 new messages