IRC Log Viewer » #firebreath » 2013-01-11

IRC Nick Time (GMT-7) Message
Alyoshak 09:01 Morning. MyPlugin.plugin now appears fine in the Internet Plug-Ins dir (Mac) but didn't work in Firefox. Doesn't show up in list of installed plugins. Ah! I'll build the FBTestPlugin. That will work. Then I'll see what's different between mine and it. FBTestPlugin doesn't work either. I have used Google and FB docs to try to find out what's wrong.
Must be something simple.
What I mean by FBTestPlugin doesn't work is simply that Firefox doesn't see it either, though the symlink seemed to work correctly, effectively show me the FBTestPlugin.plugin in the "Internet Plug-Ins" dir.
No hurry. I know y'all are busy.
Alyoshak 09:01 Aha. Just found test.html for FBTestPlugin. onLoad events fail right off the bat.
taxilian 10:01 good morning
if it doesn't detect FBTestPlugin as being installed then it certainly won't work
Alyoshak 10:01 good morning
taxilian 10:01 what version of Mac OS?
Alyoshak 10:01 10.7.5
taxilian 10:01 first thing to do is to find the binary inside the .plugin/ directory
and make sure it's built correctly
Alyoshak 10:01 Ok.
taxilian 10:01 so first make sure it is there, then run file <pluginname>.plugin/Contents/MacOS/<pluginname> (that should be the binary)
Alyoshak 10:01 I understand .plugin is a combination of files and can find the binary I think, but how wd I know if it is built corectly?
taxilian 10:01 see what it says
Alyoshak 10:01 Ok. Lookng.
Yeah, there's an "FBTestPlugin" inside the Mac folder of the contents of the package
15.1 MB
Info says its a "Unixe Executable File (Intel)"
taxilian 10:01 says what?
that's weird
give me a few
Alyoshak 10:01 When you asked me to "run file <pluginname>.plugin/Contents/MacOS/<pluginname>" not sure what you meant by "run"
I'm assuming you mean examine it.
taxilian 10:01 no, I meant run the command "file <pluginname>.plugin/...."
Alyoshak 10:01 Ok. lemme do that.
When I did the run command on the "file" it responded "directory"
To be complete, it responded "FBTestPlugin.plugin: directory"
Now Info just says, "Plug-in (Intel)"
The plugin embedded down in the package contents is the one that say "Unixe Executable File (Intel)" but the directory itself that is the plugin says "Plug-in (Intel)"
taxilian 10:01 okay, run "file" on the binary inside the plugin/ directory
is what I actually meant
Alyoshak 10:01 Ok
taxilian 10:01 but I was on a call with my boss and didn't have time to write it all out
Alyoshak 10:01 Np. Actually I'm not sure how to run "file" on a file in a dir. Can I navigate down into the directory that is the plugin to get to that specific file?
taxilian 10:01 from the command line
Alyoshak 10:01 yes
taxilian 10:01 learn it, use it, love it
Alyoshak 10:01 Got it. First line in response says Mach-O universal binary with 2 architectures
taxilian 10:01 okay. that should be fine, then
Alyoshak 10:01 2nd line goes on: FBTestPlugin (for architecture i386): Mach-O bundle i386
(Need more?)
taxilian 10:01 no, that told me what I need to know
what is the full path of that file?
Alyoshak 10:01 It is . . .
get that?
Dern. Typed it in but didn't go through.
taxilian 10:01 put a space before the first /
or it will think it's an irc command
Alyoshak 10:01 It is: "/Users/charlesjohnson/TestDev/firebreath/build/projects/FBTestPlugin/Debug"
taxilian 10:01 okay
and where is the symlink?
Alyoshak 10:01 Well, for the inner plugin it is: " "/Users/charlesjohnson/TestDev/firebreath/build/projects/FBTestPlugin/Debug/Contents/MacOS/FBTestPlugin"
The symlink is in /Library/Internet Plug-Ins
I used exactly what's in the docs. Seemed to work. At least no objections were raised.
taxilian 10:01 my guess is that your symlink isn't set up correctly
try deleting it and recreating it
Alyoshak 10:01 Ok. Will do.
taxilian 10:01 in the /Library/Internet\ Plug-Ins/ directory type "ls -al"
and see what the link points too
Alyoshak 10:01 I'll try the FBTestPlugin first, right? We shd try to get that working first it seems.
taxilian 10:01 it should look something like this:
[email protected] -> /Users/richard/code/FireBreath/buildex/projects/FBTestPlugin/Debug/FBTestPlugin.plugin
Alyoshak 10:01 ok
when I typed ls -al it doesn't give near as much as you expected. It did list "FBTestPlugin.plugin -> FBTestPlugin.plugin" as one of the plugins tho. But that's all it gave.
No, full length path.
I just typed ls -al in the Internet Plug-Ins dir
taxilian 10:01 that means you didn't create your symlink correctly
and that's why it isn't working
Alyoshak 10:01 But all the others look the same too.
The Adobe and Google Earth ones for example.
taxilian 10:01 do they have a -> ?
Alyoshak 10:01 No, the JavaAppletPlugin.plugin has a full path.
taxilian 10:01 I don't know what is up with your others, but I can tell you that what you describe will not work
Alyoshak 10:01 And the Amazon one. Anyway, ok. I'll try again.
Got it.
Not trying to quibble.
taxilian 10:01 a symbolic link is a file that says "I actually point to this path"
it can be relative
but what you're saying is it points to itself
Alyoshak 10:01 Right. Ok.
Let me try again.
Hey, you know what I did. I navigated directly to the plugin's directory and started there, unlike the ex in the docs. Maybe that made a diff.
taxilian 10:01 yeah, probably so
Alyoshak 11:01 I'll be just a sec. Wanna get this exactly right.
Ok, as before it doesn't like the Internet Plug-Ins dir referred to without enclosing double-quotes. I hope adding them isn't part of the problem.
taxilian 11:01 that is one way
another way is to use a \ before the space
you know you can complete the directory by pressing "tab" right?
Alyoshak 11:01 Excellent. Thx. No, I didn't know that either. I'll do one of those basic tutorials. I'm going on old DOS skills from 15 yrs ago.
Just figured out how to delete symlink. almost there . . .
taxilian 11:01 learn bash, you'll be glad you did =]
Alyoshak 11:01 Hate to keep you waiting. I'm trying to create the symlink. Then use ls -al. But symlink not even there. Don't wait. I'll be back asap.
I'm just slow (not getting a donut and coffee or anything =)
taxilian 11:01 I'm actually doing other things, so no worries
Alyoshak 11:01 Very odd. I used ls -al and only a fraction of the files that showed before are showing. Gulp. But went to Finder and they're all there. Even the new FBTestPlugin whose symlink I removed and then created is there. Woo-hoo. But alas ls -al doesn't show me but a few symlinks.
taxilian 11:01 type pwd and make sure you are in the directory you think you are
Alyoshak 11:01 Mystifying.
Yes. /Users/charlesjohnson/Library uh-oh. I think I'm in the wrong Library!
(sigh) thx
Ah. Wonderful. Yes I have a full path now for FBTestPlugin.plugin. I'll be back v soon with whether FBControl works now or not.
taxilian 11:01 test.html is the better one to run there
Alyoshak 11:01 Yes. Just did. Both loads failed again.
But let me exam more closely this symlink. Go on. I'll be right back.
symlink path looks like the following, so I'm thinking the full path to it still isn't right: FBTestPlugin.plugin -> firebreath/build/projects/FBTestPlugin/Debug/FBTestPlugin.plugin
That's the results from ls -al
I'm using "ln -s buildex/projects/FBTestPlugin/Debug/FBTestPlugin.plugin /Library/Internet Plug-Ins/" from the docs, but maybe I need to go ahead and specify the full path from the beginning. Or maybe I'm just missing a forward slash.
Amazon's begins with "/Applications . . ."
The symlink path was not right. All the tests succeeded but the "Dialog callback test . . ." I was prompted to enter some text. I entered "Halibut". And nothing ensued. Probably the prompt for this callback test. Wasn't in red. Doesn't say "failed". But it's the only one in grey.
Many thanks. I'm certain now that my custom plugin has a bad symlink pointing to it.
taxilian 11:01 yes, you need to specify the full path
doesn't matter what you put in the dialog; it's just a callback test
jshanab_OSX 11:01 I had a bit of an issue first time i did the symlink on Mac. (why I posted what worked for me on wiki I dunno if that is totally accurate
Alyoshak 11:01 Thanks for the link.
Alyoshak 14:01 Afternoon. Yeah, back. This thing's fighting me the whole way.
Btw, we've successfully used FB on the Windows side. It's just this Mac side that's afflicting me.
The FBTestPlugin shows up fine in Firefox's plugin check but mine doesn't.
That's the gist of it. FBPluginTest works fine with the test.html too.
One of our guys here even modified the test.html to test our plugin and it seemed to work pretty well, tho at first the first onload() failed but the next 2 succeeded. Weird. I'm convinced there's something wrong with the plugin since FBTestPlugin shows up fine in the Firefox plugin check window.
I've gone over the symlink path character by character to make sure that's right. That's what was keeping FBPluginTest from being recognized by Firefox before.
taxilian 14:01 check the console ( and see if anything interesting shows up indicating why it isn't loading
are you using any shared libraries? linking to anything special?
Alyoshak 14:01 Yep. We are indeed. Linking to Silicon Labs hid uart dll.
taxilian 14:01 betting it probably can't find the dylib on mac, then
Alyoshak 14:01 Hmm... ok.
So it might simply be an issue of putting the dylib in with the plugin? I kinda assumed the dylib wd be built into the plugin, but I know very little about how things work at that level.
taxilian 14:01 no, a dylib is a dynamically linked library
like a DLL
and it may need to be put with the plugin, you may also need to use install_name_tool to make sure it can be found
Alyoshak 14:01 Yeah, that's what we did on the windows side.
I opened Console btw and then reloaded the Firefox page that checks the installed plugins and nothing changed at all in the Console app. So I'm assuming you want me to watch the Console when . . . I'm doing what?
taxilian 14:01 it was a long shot, but it was a possibility
sounds like it didn't work
this isn't really an exact science, I'm afraid
since I don't know what you have done with your plugin, I can't predict exactly what is going on
but I bet it's related to not finding that dylib
Alyoshak 14:01 Ok. I put the dylib in there just now, but it didn't change things. At least I've got something to focus on. "install_name_tool" is a cmake command I'm assuming.
taxilian 14:01 no
it's a mac thing
your problem right now has nothing to do with cmake
and everything to do with you not knowing how mac os dylibs work
I suggest doing some research =]
I don't have time to walk you through troubleshooting it right now
Alyoshak 14:01 I'm already finding out interesting things.
taxilian 14:01 otool is another useful utility that you will probably need
along with install_name_tool
otool can be used to show you where it thinks it will find the dylib
and install_name_tool can be used to change that value
Alyoshak 14:01 Wow. I had no idea it was more complicated than just putting the dylib in with the plugin.
Yeah, that's what that link was saying ("otool")
Ok. I'm going to log out and come back later with results. Thx again.
jshanab_OSX 18:01 I should have been watching the list today, I am stuck just one step ahead of Alyoshak.
niftylettuce 20:01 taxilian_away: u should run an indiegogo to build an open source browser extension framework, utilizing your experience with plugins as cred/reputation -- and use our service for t-shirt/stickers/hats rewards :)
taxilian 21:01 niftylettuce: I don't know anything about extensions, and I don't really have any compelling reason to learn =]
niftylettuce 21:01 taxilian: lol
taxilian: build one of a dozen browser extension ideas i have isn't bad, but still proprietary and you have to upload code to their webpage
taxilian 21:01 heh. I have no time for such things
niftylettuce 21:01 ugly IDE not hacker dev friendly w/vim