Modify chrome extension for personal use - google-chrome-extension

I would like to modify a chrome extension for personal use. However, I have not been able to install it satisfactorily.
When I use 'load unpacked extension', my browser warns me every time I launch that I am using developer mode extensions. If I pack it and install it, I get the error 'this extension may have been corrupted' and cannot enable it.
I have tried removing the 'key' from the manifest.json and updating the version number, but still get the corruption error. What do I need to do to prevent this error from coming up?
Edit: I tried hosting it on the Chrome Web Store under private visibility, but when I try to install it I get 'An error has occurred: Access denied'.

Related

How to handle failed tabs.create with message 'No current window'?

I need to show a new tab to users when they first install the Chrome extension. If I run tabs.create in the runtime.onInstalled listener, it will sometimes fail with the runtime.lastError.message set to 'No current window'.
I experimentally found out that one of the causes for this is an enterprise policy to force install a Chrome extension.
So, is it possible to detect that the extension was installed with the force enterprise policy? In that case, I would not make the tabs.create call on extension install, or I would first create a window and then create a tab inside it.
Or is there any other way to handle this issue? I am not sure if enterprise force install is the only reason for the 'No current window' failure message.

Self-signed crx displayed as corrupted in Google Chrome 63

Looks like starting from the Google Chrome 63 loading self-signed crx file fails with a message: "This extension may have been corrupted".
From the browser logs I see that Chrome is trying to check the verified contents from the store, and, of course, failing.
content_hash_fetcher.cc(252)] Missing verified contents for cfbklnofppkbgcfhppceodfodekoecoa, fetching...
job failed for cfbklnofppkbgcfhppceodfodekoecoa reason:1
VerifyFailed cfbklnofppkbgcfhppceodfodekoecoa reason:1
That's happening for all extensions I can check.
Self-signed crx were disabled on reloading Chrome for a while now, but that was mostly OK for basic testing. Now it seems to be not possible at all.
Is there a way to install extensions for testing on Chrome 63?
Installing unpacked extensions works (for now), but that's not the same as installing crx. We had some issues which were not happening with unpacked extensions, mostly with init and storages.
UPD: the issue is tracked here https://bugs.chromium.org/p/chromium/issues/detail?id=794219
Not sure exactly why this is happening, but the "fix" for us was to put a dummy update_url key in the manifest.json for the extension:
"update_url": "https://www.google.com"
Any old URL will do.
Warning: You will need to remove this before deploying to the Chrome Web Store as it might break your users' upgrade process.
Chrome bug this is the chrome bug tracking this issue. Please star it so that it gets some attention https://bugs.chromium.org/p/chromium/issues/detail?id=794219
Also not sure if this will continue to work in the future.

Silent install of chrome extension using registry

For some reason I cannot get this to work. I'm following the exact procedure described here
http://developer.chrome.com/extensions/external_extensions.html#registry
And I still cannot get the extension listed. If I install it manually, using "Add Unpacked Extension" it works just fine.
Any help would be greatly appreciated
One of many writeups on this subject:
Google on Friday announced that it is changing its stance for silently
installing extensions in its browser. As of Chrome 25, external
extension deployment options on Windows will be disabled by default
and all extensions previously installed using them will be
automatically disabled.
You're much better off submitting your extension to the Chrome Web Store. If you really want to install off-store, consider inline installation.
I have been struggling with installing an addon via the registry as well. I was successful with installing an addon without adding reg keys. And using the preferences file.
I extracted my extension to Local\Google\Chrome\User Data\Default\Extensions\${ADDONID}\${VERSION}
I then added my extension directly to the Preferences file in Local\Google\Chrome\User Data\Default under the section extensions settings ${ADDONID} <-- add your extension. Compare the Preferences file to an instance you have already installed your addon. And copy that to the Preferences file along with the extension directory on a fresh install. And it should work.
This thread gave me some direction:
https://superuser.com/questions/462804/how-to-copy-an-extension-from-one-chrome-installation-to-another

Does publishing to only test accounts cause "Could not fetch data from the Chrome Web Store" error

I'm trying to implement Inline Installation of a Chrome Extension (https://developers.google.com/chrome/web-store/docs/inline_installation), but when I call chrome.webstore.install() I get back an error stating "Could not fetch data from the Chrome Web Store".
The extension is currently only published to a group of testers in a Google Group, of which I am a member (owner, actually), and I am able to install the extension just fine from the store itself. But I'm wondering if this error is due to its being in this testing mode. There doesn't seem to be any information in the Google Code docs, or anywhere on the web that I can find for this error.
This issue has just been fixed yesterday: http://code.google.com/p/chromium/issues/detail?id=138155
The fix is already working on the Canary channel build. I don't know how long it takes to reach the other channels.

Error on installing any module in DotNetNuke 5.6.3

When I upload any module in System->Extensions in DotNetNuke 5.6.3, running on a Windows 2008 R2 server, IIS 7.5, after the correct module information is displayed and I hit next, I receive the error message
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object.at DotNetNuke.UI.WebControls.FieldEditorControl.CreateEditor()at DotNetNuke.UI.WebControls.FieldEditorControl.DataBind()at
DotNetNuke.UI.WebControls.PropertyEditorControl.AddFields(Table tbl)at
DotNetNuke.UI.WebControls.PropertyEditorControl.CreateEditor()
[...]
and the module is not installed. The file system of the web has not been touched, so I thought it was a permission problem, but even allowing user Everyone to do everything doesn't help (after making sure the ApplicationPoolIdentity user has been allowed full access as well).
Any hint is appreciated.
The manifest of the module is valid (it's Dynamic Registration 4.1).
Update: Installation steps (note: I am using a German installation of Windows 2008, so some translations might not be accurate)
Log in as Hosts Super User (Admin)
Either navigate to System->Extensions or System->Module Definitions (System might be identical to Hosts) - I tried both
In System->Extensions, click Installation assistant for extensions
Select file to upload
Click next
Description of uploading package appears correctly - click next
Error message Object reference not set to an instance of an object. appears on top of the page. Log View shows stack trace as partly displayed above.
What can cause an error in DotNetNuke.UI.WebControls.FieldEditorControl.CreateEditor()?
What kind of permissions could be missing?
Update 2: By step-by-step debugging, I found out that the view state is broken, for some reason. The method BindPackage() in DesktopModules\Admin\Extensions\Install.aspx.vb doesn't find the current Installer Package. I have not yet found out why the viewstate breaks. It is enabled and huge in the rendered page source.
As described in Update 2, the page's viewstate is lost in DesktopModules\Admin\Extensions\Install.aspx.vb. Simply replacing ViewState by Session works (but this workaround may be lost after the next DNN update).
Update (in case someone has a similar issue):
The DNN container that was used had its viewstate turned off! This results in all kinds of weird behaviour, but it took time to track that error. Now it's obvious.

Resources