Unhandled Exception when Download Album Info

HomeForumsPublish on Gallery 3Unhandled Exception when Download Album Info

This topic has 2 voices, contains 17 replies, and was last updated by  Hammers 94 days ago.

Viewing 15 posts - 1 through 15 (of 18 total)
Author Posts
Author Posts
February 7, 2012 at 5:23 pm #1259
 Hammers

Tomek,

Thank you for these modules. I greatly appreciate your work. Also, thank you for adding the caption to title option for XMP.

I am having difficulty with POG3. When I enter the information and try to Download Album Info, I get an Exception. Please see these screenshots:
http://imgur.com/DcVqz,C0OxQ,HeIyc#0
http://imgur.com/DcVqz,C0OxQ,HeIyc#1
http://imgur.com/DcVqz,C0OxQ,HeIyc#2

Here is the debug information:
==========
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
GalleryInterface.GalleryInterfaceException: Exception of type ‘GalleryInterface.GalleryInterfaceException’ was thrown.
at GalleryInterface.Gallery3InterfaceManager.ReloadGalleryData()
at PublishOnGallery3.ConfigurationForm.testUserKeyButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5448 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
—————————————-
PublishPluginsInterop
Assembly Version: 15.4.0.0
Win32 Version: 15.4.3538.0513_ship.wlx.w4m4 (ship)
CodeBase: file:///C:/Program%20Files%20(x86)/Windows%20Live/Photo%20Gallery/PublishPluginsInterop.DLL
—————————————-
msvcm90
Assembly Version: 9.0.30729.4940
Win32 Version: 9.00.30729.4940
CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742/msvcm90.dll
—————————————-
Microsoft.WindowsLive.PublishPlugins
Assembly Version: 1.0.0.0
Win32 Version: 15.4.3538.513
CodeBase: file:///C:/Program%20Files%20(x86)/Windows%20Live/Photo%20Gallery/Microsoft.WindowsLive.PublishPlugins.DLL
—————————————-
PublishOnGallery3
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PublishOnGallery3/PublishOnGallery3.dll
—————————————-
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
—————————————-
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5447 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
—————————————-
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
—————————————-
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
—————————————-
PublishOnGallery3DataModel
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PublishOnGallery3/PublishOnGallery3DataModel.DLL
—————————————-
GalleryInterface
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PublishOnGallery3/GalleryInterface.DLL
—————————————-
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
—————————————-
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
—————————————-
Newtonsoft.Json
Assembly Version: 3.5.0.0
Win32 Version: 3.5.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PublishOnGallery3/Newtonsoft.Json.DLL
—————————————-

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
======

I am running the client side application on Windows 7 64-bit. This is a new install of Gallery 3 with my Gallery 2 albums imported into it.

Any ideas what I am doing wrong?


  Quote
February 9, 2012 at 10:28 am #1264
 Tomek

Hi, I will take a look at this over the weekend when I have some more time. In the mean time, would you also mind noting down which (if any) non-default Gallery 3 modules you are running (aside from XMP)?

Do you have any “odd” names for your photos or albums? By that I mean non-English lettering, or perhaps some html code in your album names?

There are also non PoG ways of testing whether things will work right, if you have a way of changing the headers sent to your website (something like modify headers for Firefox) and you’re feeling a little adventurous. That might at least give use what PoG is trying to parse and failing.

Thanks,

Tomek

EDIT: I forgot to say thank you for a thorough bug report – it’s much easier to get the screenshots and the stack trace at once!


  Quote
  • This reply was modified 101 days ago by  Tomek.
February 9, 2012 at 6:11 pm #1267
 Hammers

Tomek,

I currently have several modules installed, but I had less modules installed when I originally test it.
ClusterMaps is now loaded, but was not when I reported the problem.
KbdNavigation
Organize (I think this is included in G3)
Photo Annotation
REST API (included in G3)
Shadowbox
Tags
Thumb Navigator
XMP

My album names are all pretty generic. I don’t have any high-level ascii characters, characters with accents, or anything strange. No HTML in character names.

I think if you look at the forums for POG2 you will see several users post a similar-looking problem. I am wondering if it has something to do with failing authentication? But that is nothing more than a guess.

I can do some header testing with Firefox if you’re willing to provide detailed instructions. I’m not really much of a web developer. I’m just a guy that is handy with computers. I don’t mind experimenting with firefox. I can spin up a VM and make any changes without worrying about breaking something.

Thanks,
Ken


  Quote
February 12, 2012 at 12:52 am #1269
 Tomek

Hi Ken,

I think I might need you to try some debugging with headers. None of those plugins are ringing any bells for me. Basically, I think the error you see is from the program choking on trying to interpret information sent back from your Gallery3 Install.

Please download the “Modify Headers” add-on for Firefox. Enable it, and add the following two headers using “Add” button:

1) X-Gallery-Request-Key – This is your REST key that you would use for the Publish on Gallery authentication key.
2) X-Gallery-Request-Method – set this to “GET” (without the quotes)

Enable the two keys you just set up, and make sure to hit the “start” button on the add on itself. Once you have that loaded, go to “http://YOUURL.com/gallery3/rest/item/1?type=album&output=html”. You should see what looks like list of information about your root album.

If you see only “[ ]” that usually means that you don’t have the right headers set up. You can check that you are correctly sending the headers by opening up Firefox’s web console (ctrl+shift+k), reloading the page, and then clicking on the underlined URL after “GET”. You should see both of your “X-Gallery-Request-XYZ” headers listed.

If the page loads correctly, one of the items listed should be the “members” of that album. This should be something like:

‘members’ =>
array (
0 => ‘http://kott.fm/gallery/rest/item/10?output=html’,
1 => ‘http://kott.fm/gallery/rest/item/534?output=html’,
2 => ‘http://kott.fm/gallery/rest/item/537?output=html’,
3 => ‘http://kott.fm/gallery/rest/item/567?output=html’,
4 => ‘http://kott.fm/gallery/rest/item/627?output=html’,
)

If you could email me the entire contents, not just the members, of the page you see (email: my first name at the url of this site), so I can take a closer look, that would be great. I’m asking by email, since I really need the full output, and it might contain private info.

While we’re at it, could you double check that you have .NET 4.0 installed on your Win7 machine? And could you let me know which version of Gallery3 you have installed? (By going to the admin dashboard, it should be on the top right under gallery stats. Could you give the full version including build number?).

Hopefully we can get this squared away!

Tomek


  Quote
February 12, 2012 at 11:08 am #1270
 T Jones

I had the same error. I have used this many times. I then realized that I changed the website address and not the user API. All errors disappeared.

I now know one API for each website address and user.

I don’t know if this error relates to API but my error had the same headings.

Thank you for such and easy way to publish. I will definitely give to your coffee fund.


  Quote
February 12, 2012 at 12:57 pm #1272
 T Jones

FYI
I had it happen a second time when I returned later.
None of the information changed.
I created a new user. nothing
I took it off maintenance mode, success.
Next time I will try to change permissions instead of maintenance mode.

Hope this helps others.


  Quote
February 13, 2012 at 12:07 pm #1273
 Hammers

Tomek,

I don’t think it worked as intended. I installed the plugin and loaded the header options. I clicked start and entered the URL into a browser tab. I think the problem is that URL doesn’t exist. Anytime I enter a URL that doesn’t exist, my browser will just default back to my homepage. That is what happened here.
I took some screenshots of what I saw.
http://i.imgur.com/NuqJ7.png
I scrolled to the top GET statement and clicked on it for details:
http://i.imgur.com/l6uFG.png
Verified I’m using .NET 4
My Gallery 3 is running 3.0.2 (Coollanta)

I hope that test provided you with something meaningful that you can use and that I didn’t mess something up. Let me know what you’d like me to try next.


  Quote
February 13, 2012 at 12:07 pm #1274
 Hammers

Whups, forgot this. This shows I’m on .NET 4
http://i.imgur.com/7RAhS.png


  Quote
February 13, 2012 at 1:46 pm #1275
 Tomek

Ahh, we’re getting closer then. I actually double checked on your gallery with /gallery3/index.php/rest/item/1, and got the answer I expected (nameley “[]“). Come to think of it, I could’ve done this myself earlier…sorry for leading you on a wild goose chase. You could go there and see what I was talking about. The actual content isn’t important any more.

However, this most likely means that your rewrite rules for URL’s aren’t set up in the (I think) default Gallery3 setup.

In the gallery3 install folder, there should be an ‘.htaccess’ file, that contains a section that looks like “mod_rewrite”. What I have is here: http://kott.fm/tomek/forums/topic/patch-problem-with-mod_rewrite/#post-1126. If you could post that section of your configuration, we can probably figure out a way to get things working.

I have a feeling that it was my last bugfix in PoG that actually caused this, since to be more accommodating of other “mod_rewrite” configurations, I got rid of “index.php” as part of the default URL that it checks. Perhaps the better way to do this is to provide a second check, in case the “/rest/item/1″ URL doesn’t work, to fall back onto “index.php/rest/item/1″. I’ll try to code that up this week or weekend, and release a new version of PoG.


  Quote
February 13, 2012 at 2:16 pm #1277
 Hammers

Tomek,

Thanks for getting back so quickly. I don’t have an .htaccess file in my gallery3 folder. Actually, I don’t have one in my gallery folder, either.
I’m still pointing my web page to my gallery 2 install (gallery) until I get gallery 3 situated.

The only .htaccess file I have is in the root of my website in the ‘kenaldrich.com’. folder. It looks like I’m just using the default one that came with Joomla. Maybe I should be doing things much differently? I barely know what I’m doing here, haha. Details below:

##
# @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $
# @package Joomla
# @copyright Copyright (C) 2005 – 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: ‘Options +FollowSymLinks’ may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url’s. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

########## Begin – Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#
#Order allow,deny
#Deny from all
#Satisfy all
#
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a tag in URL
RewriteCond %{QUERY_STRING} (\|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End – Rewrite rules to block out some common exploits

# Uncomment following line if your webserver’s URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

# RewriteBase /

########## Begin – Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End – Joomla! core SEF Section


  Quote
February 13, 2012 at 2:33 pm #1278
 Tomek

Huh, it’s odd that you don’t have an .htaccess file for the gallery3 install. I’m surprised things are even working to show the pages! The file should come with the downloaded package; I just double checked to make sure I wasn’t wrong on that.

I think the easiest thing to do is to check your downloaded gallery3 install, and copy that .htaccess over to your gallery3 folder (i.e., don’t overwrite the one provided by joomla in the root folder).

You’ll then have to uncomment some of the lines at the bottom of that file, and change the “RewriteBase” to “/gallery3″ (and then eventually to “/gallery” once you switch over).

Basically, a “.htaccess” file provides some directions for the web server that are configurable by the end user (you) rather than for the entire server (which on a shared server might be many many people). You can provide one in each and every directory. The directions are cumulative, with child folders (such as gallery3) directions overriding parent ones (such as your root).

Tomek


  Quote
February 13, 2012 at 4:35 pm #1279
 Hammers

Tomek,

Thanks. I just re-downloaded Gallery 3 and unzipped it on my windows workstation. Sure enough, there is an .htaccess file. I went to make the changes to the file and save it, but windows would net let me. The file begins with a period. I suspect this is what caused my problem when I originally copied gallery 3 to my server. Instead of copying the archive to the server and decompressing there, I had unzipped here and uploaded the uncompressed version. I suspect Windows had a problem with that file because of the period at the beginning of the name. So, I just modified the file, saved it as a text, put it in gallery3 folder, and opened a shell with putty to rename it. Now Firefox is behaving as you had instructed it would earlier. I now see the members array.
I wasn’t sure about the impact of having multiple htaccess files. I didn’t know if they would conflict. So thank you for providing me some training on that. Now I’ve just got to remember that when I migrate fully to G3 that I remember to update that pointer.

I tried the POG3 plugin through WLPG and still got an exception, but I’m guessing you were expecting that? Let me know if you would like me to gather more information.

Thanks


  Quote
February 13, 2012 at 6:25 pm #1280
 Tomek

Hi Ken,

Actually, no, I was hoping that would be the answer :) . But at least we’ve narrowed down the possibilities a bit!

Ok, so you can get the information (stored in JSON format) from the webserver with the /rest/item/1?output=html call. Could you email that to me (your other email got to me fine)? A couple things to try while I’m perusing that:

0) Try restarting WLPG. The reason could be that either PoG or WLPG has cached the webserver response or the error from PoG and is now failing constantly.

1) Double check that the “User Key” in PoG3 is the same as the one you used to get the REST information using Firefox (I’m sure it is, but on occasion it doesn’t copy well :) ).

2) Try putting in http://kenaldrich.com/gallery3/ in your URL box. While the program should automatically normalize “kenaldrich.com/gallery3″ to the above, maybe something is going wrong there.

3) Is it the same exact error that you’re seeing from PoG? If it isn’t, would you please email that to me as well?

4) One last thought – if you use Firefox Dev tools like before, clear the output, and then try to refresh the page (rest/item/1), you should only see one entry appear. If you don’t, could you post a screenshot of that as well?

Thanks for your patience! It might be that there is some odd setup that I hadn’t accounted for. I don’t see anything obvious yet. Hopefully we’ll get to it, fix it and make it better for everyone else. Sorry that you had to be the guinea pig.

Tomek


  Quote
  • This reply was modified 96 days ago by  Tomek. Reason: Edited URL to not include errant quote mark
February 13, 2012 at 8:29 pm #1282
 Hammers

Tomek,

I started by closing open applications and rebooting the workstation.
I opened WLPG, activated the plugin, put in http://kenaldrich.com/gallery3, copied and pasted the REST key and, as usual, made sure there were no leading or trailing spaces, then pressed the “Download Album Info”. After a long pause, the data successfully populated this time.
I closed WLPG, opened WLPG, and tried kenaldrich.com/gallery3, copied the key, pressed the button, and the data successfully populated again.

The only thing I can think of is that something had been cached. Fixing the .htaccess file must have resolved the problem, but my test afterwards must have failed for some reason.

It is getting late in the day here. Maybe I’ll rename my .hataccess file and see if that breaks it again.


  Quote
February 13, 2012 at 8:41 pm #1283
 Hammers

AND! I successfully uploaded a photo to my gallery with it. The gallery had some face tags for people in the photo. It successfully uploaded the face tags, however the boxes are not on the faces. There seems to be a problem with the coordinates.


  Quote
Viewing 15 posts - 1 through 15 (of 18 total)

The topic ‘Unhandled Exception when Download Album Info’ is closed to new replies.