Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Fix extension ID for PDFJS #2527

Merged
merged 2 commits into from
Jul 17, 2016
Merged

Fix extension ID for PDFJS #2527

merged 2 commits into from
Jul 17, 2016

Conversation

bbondy
Copy link
Member

@bbondy bbondy commented Jul 17, 2016

This was failing to load for me I think because the PDFJS_ORIGIN ID was different from the one installed. It's unclear to me if the new one that I have that is in use by my instance will be the same for everyone. This works concistently for me though and keeps the 2 IDs in sync

Auditors: @bridiver, @diracdeltas

@@ -36,7 +36,7 @@ let windowState = Immutable.fromJS({
let lastEmittedState

const CHANGE_EVENT = 'change'
const PDFJS_ORIGIN = 'chrome-extension://adnmjfhcejodgpaljdmlmjoclihpcfka/'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main bug that here it is using adnmjfhcejodgpaljdmlmjoclihpcfka but above it installs as oemmndcbldboiebfnladdacbdfmadadm

Fix #2529

This was failing to load for me I think because the PDFJS_ORIGIN ID was different from the one installed. It's unclear to me if the new one that I have that is in use by my instance will be the same for everyone.  This works concistently for me though and keeps the 2 IDs in sync

Auditors: @bridiver
@@ -40,5 +40,6 @@ module.exports = {
authUrl: (userId) => `${vaultHost}/v1/users/${userId}`,
replacementUrl: adHost
},
braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd'
braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd',
PDFJSExtensionId: 'ckglimbbooghmggmkikhbolcfmgniemo'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did you get this ID from?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this change, pdfjs doesn't load for me at all (same thing that was happening for you before this change). i.e., chrome-extension://ckglimbbooghmggmkikhbolcfmgniemo/https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf is blank but chrome-extension://adnmjfhcejodgpaljdmlmjoclihpcfka/https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf loads fine. maybe this origin is unique per install?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in chrome, the PDF viewer origin is chrome-extension://oemmndcbldboiebfnladdacbdfmadadm which makes more sense

Copy link
Member

@diracdeltas diracdeltas Jul 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appears that chrome.extension.getURL is returning a random(?) value in

var VIEWER_URL = chrome.extension.getURL('content/web/viewer.html');
instead of chrome-extension://<extension_id>. this does not seem to be an issue in chrome. @bridiver ideas?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is all worked out in the follow up commit by the way by Yan. I got the ID from the one that is used when opening PDFs from a link.

@diracdeltas
Copy link
Member

Just pushed a fix for the extension URL inconsistency issue so now it works for me. @bbondy please check that it works for you.

@bbondy
Copy link
Member Author

bbondy commented Jul 17, 2016

Excellent, works perfectly! Thanks!

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

Successfully merging this pull request may close these issues.

3 participants