Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried to get undefined file at undefined and got an HTTP undefined #152

Closed
hroncok opened this issue Aug 10, 2013 · 18 comments
Closed

Tried to get undefined file at undefined and got an HTTP undefined #152

hroncok opened this issue Aug 10, 2013 · 18 comments
Labels

Comments

@hroncok
Copy link

hroncok commented Aug 10, 2013

When I try to export my badges, I got several of those:

We have encountered the following problem: Tried to get undefined file at undefined and got an HTTP undefined

Updates-Testing I to III are affected.

@calweb
Copy link
Contributor

calweb commented Aug 11, 2013

I found the same issue when trying to export, and I believe jquery is undefined because of serving over SSL (can be resolved by using protocol agnostic url's in the template), which breaks the issuing of badges with the following references from my console:

[blocked] The page at https://badges.fedoraproject.org/user/463 ran insecure content from http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js.
463:1
[blocked] The page at https://badges.fedoraproject.org/user/463 ran insecure content from http://beta.openbadges.org/issuer.js.

@ralphbean
Copy link
Contributor

I have a feeling that #180 doesn't actually fix this. I think the error comes from openbadges.org trying to call back to our "assertion API". Stuff there is failing because some of our URLs contain edge case characters like !. I'm 99% sure that's what's happening.

I have to make a database change on the server to replace those slugs with versions that don't include those weird characters.

(Side note -- I know the way to normally handle this is to urlencode those urls before handing them to openbadges. The problem is that openbadges.org did some double-encode with only one decode and/or double-decode with only one encode stuff. That's why we see the "undefined" message.)

@ralphbean
Copy link
Contributor

Ok. I upgraded the staging database, tested exporting, and it worked. I then upgraded the production db just now, tested exporting, and it worked.

@hroncok, and @calweb: can you test that it works for you too? If so, feel free to close this ticket.

@ralphbean
Copy link
Contributor

Ping @hroncok and @calweb -- can you verify that this is fixed for you?

@hroncok
Copy link
Author

hroncok commented Aug 16, 2013

badges-export

Ehm, error changed.

@calweb
Copy link
Contributor

calweb commented Aug 16, 2013

Yeah, i see that too, here's more on the error

{"message":"Could not get all linked resources","stack":"Error: Could not get all linked resources\n    at makeError (/var/www/openbadges/node_modules/openbadges-validator/index.js:385:15)\n    at hollaback (/var/www/openbadges/node_modules/openbadges-validator/index.js:208:23)\n    at /var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:21:12\n    at /var/www/openbadges/node_modules/async/lib/async.js:530:17\n    at /var/www/openbadges/node_modules/async/lib/async.js:116:25\n    at /var/www/openbadges/node_modules/async/lib/async.js:24:16\n    at /var/www/openbadges/node_modules/async/lib/async.js:527:21\n    at Request._callback (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:73:14)\n    at Request.callback (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:127:22)\n    at Request.emit (events.js:70:17)","code":"resources","extra":{"badge.image":{"message":"content-type","stack":"ResourceError: content-type\n    at makeError (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:26:15)\n    at error (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:36:20)\n    at Request._callback (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:73:29)\n    at Request.callback (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:127:22)\n    at Request.emit (events.js:70:17)\n    at Request.<anonymous> (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:767:16)\n    at Request.emit (events.js:88:20)\n    at IncomingMessage.<anonymous> (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:729:14)\n    at IncomingMessage.emit (events.js:88:20)\n    at HTTPParser.onMessageComplete (http.js:137:23)","code":"content-type","url":"https://badges.fedoraproject.org/pngs/involvement.png","expected":"image/png","received":"image/png; charset=UTF-8","name":"ResourceError"}}}

@calweb
Copy link
Contributor

calweb commented Aug 16, 2013

@ralphbean
Copy link
Contributor

The page at https://badges.fedoraproject.org/user/463 displayed insecure content from http://infrastructure.fedoraproject.org/infra/badges/pngs/flock-2013-attendee.png.

Thanks @calweb. Just fixed that one.

@ralphbean
Copy link
Contributor

Here's that error broken out and formatted a little more nicely:

{'code': 'resources',
 'extra': {'badge.image': {'code': 'content-type',
                           'expected': 'image/png',
                           'message': 'content-type',
                           'name': 'ResourceError',
                           'received': 'image/png; charset=UTF-8',
                           'stack': 'ResourceError: content-type\n    at makeError (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:26:15)\n    at error (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:36:20)\n    at Request._callback (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:73:29)\n    at Request.callback (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:127:22)\n    at Request.emit (events.js:70:17)\n    at Request.<anonymous> (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:767:16)\n    at Request.emit (events.js:88:20)\n    at IncomingMessage.<anonymous> (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:729:14)\n    at IncomingMessage.emit (events.js:88:20)\n    at HTTPParser.onMessageComplete (http.js:137:23)',
                           'url': 'https://badges.fedoraproject.org/pngs/involvement.png'}},
 'message': 'Could not get all linked resources',
 'stack': 'Error: Could not get all linked resources\n    at makeError (/var/www/openbadges/node_modules/openbadges-validator/index.js:385:15)\n    at hollaback (/var/www/openbadges/node_modules/openbadges-validator/index.js:208:23)\n    at /var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:21:12\n    at /var/www/openbadges/node_modules/async/lib/async.js:530:17\n    at /var/www/openbadges/node_modules/async/lib/async.js:116:25\n    at /var/www/openbadges/node_modules/async/lib/async.js:24:16\n    at /var/www/openbadges/node_modules/async/lib/async.js:527:21\n    at Request._callback (/var/www/openbadges/node_modules/openbadges-validator/lib/resources.js:73:14)\n    at Request.callback (/var/www/openbadges/node_modules/openbadges-validator/node_modules/request/main.js:127:22)\n    at Request.emit (events.js:70:17)'}

What's funny is that it seems to be complaining about https://badges.fedoraproject.org/pngs/involvement.png, but that image is definitely there. Maybe this is a temporary thing with the openbadges.org people. I'll ping them in IRC and point them at this ticket. Maybe they have some idea what's happening.

@ralphbean
Copy link
Contributor

@brianloveswords nailed it. He says "...it's complaining about the content-type returned – it looks like
that ; charset=UTF-8 is throwing it off."

That's something on our side about how the pngs are getting served up. I'll look into it.

@ralphbean
Copy link
Contributor

Ok. Content-type is just image/png now. @hroncok and @calweb: can you confirm that its working for you now?

Thanks in advance for futzing over this with me.

@calweb
Copy link
Contributor

calweb commented Aug 16, 2013

@ralphbean Man, you guys are rockin it! I assume this change is in http://badges.fedoraproject.org? If so, I'll try to see

@calweb
Copy link
Contributor

calweb commented Aug 16, 2013

So I tested it out and the error reported above is gone, but now i get a 404 on the openbadges side
screen shot 2013-08-16 at 4 48 23 pm

Failed to load resource: the server responded with a status of 404 (Not Found) https://beta.openbadges.org/issuer/[[assertion.badge.image]]

@calweb
Copy link
Contributor

calweb commented Aug 16, 2013

this looks related?

mozilla/openbadges-backpack#167

@ralphbean
Copy link
Contributor

Ah, the issue is that your badges are awarded to FASUSERNAME@fedoraproject.org, not your gmail address.

If you try logging into Persona with that address, does that fix it?

@hroncok
Copy link
Author

hroncok commented Aug 17, 2013

Fixed for me. Thanks.

@calweb
Copy link
Contributor

calweb commented Aug 17, 2013

I don't think I'm part of any groups with my FAS acct. will the alias still work?

On Aug 17, 2013, at 8:44 AM, Miro Hrončok notifications@github.com wrote:

Fixed for me. Thanks.


Reply to this email directly or view it on GitHub.

@ralphbean
Copy link
Contributor

@calweb unfortunately, I don't think it will. You do have to be in the CLA group + 1 other group for the alias to work. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants