Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler - google-chrome

I try to inject several SIMBL plugins (e.g. Afloat and FScriptAnywhere) into Chrome and other applications.
It works fine on all other applications but not on Chrome. There I get this output on console:
01.09.11 13:30:15,911 SIMBL Agent: Google Chrome started
01.09.11 13:30:15,912 SIMBL Agent: app start notification: {
NSApplicationBundleIdentifier = "com.google.Chrome";
NSApplicationName = "Google Chrome";
NSApplicationPath = "/Applications/Google Chrome.app";
NSApplicationProcessIdentifier = 87543;
NSApplicationProcessSerialNumberHigh = 0;
NSApplicationProcessSerialNumberLow = 30412031;
NSWorkspaceApplicationKey = "<NSRunningApplication: 0x40092c060 (com.google.Chrome - 87543)>";
}
01.09.11 13:30:15,913 SIMBL Agent: checking bundle /Users/az/Library/Application Support/SIMBL/Plugins/Afloat.bundle
01.09.11 13:30:15,913 SIMBL Agent: checking target identifier *
01.09.11 13:30:15,914 SIMBL Agent: send inject event
01.09.11 13:30:15,956 SIMBL Agent: eventDidFail:'tvea' error:Error Domain=NSOSStatusErrorDomain Code=-1708 "The operation couldn’t be completed. (OSStatus error -1708.)" (the AppleEvent was not handled by any handler ) UserInfo=0x400877940 {ErrorNumber=-1708} userInfo:{
ErrorNumber = "-1708";
}
01.09.11 13:30:15,957 [0x0-0x1d00cff].com.google.Chrome: Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler in scripting addition /Library/ScriptingAdditions/SIMBL.osax.
I think the eventDidFail:'tvea' error can be ignored because I get it on all applications (although I wonder what it is).
However, I think the last error Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler in scripting addition /Library/ScriptingAdditions/SIMBL.osax is the relevant one.
What does it mean? What could it be?

Ah, it seems it was introduced as a feature by Chrome itself to blog SIMBL plugins because of stability issues.
http://www.conceivablytech.com/8990/products/google-stabilizes-chrome-for-mac-os-x-lion-adds-pulseaudio-for-linux
This is the patch for Chrome. And this is the bug report. Interesting, btw.; it uses mach_override from mach_star to patch the internal function _CFBundleLoadExecutableAndReturnError to add a check for blacklisted libraries.
I filed a bug report about a way to disable that CFBundleBlocker here.
I found a way to workaround the CFBundleBlocker in Chrome:
I patched SIMBL to work in /System/Library rather than in /Library. The patched version can be found here. Also, that patched SIMBL searches for SIMBL plugins also in /System/Library/Application Support/SIMBL/Plugins/. The SIMBL plugins must be installed in that directory because otherwise Chrome would also block them.

Related

How to stop HTTP request which send data to Mixpanel from Viewer3D.js

Viewer3D.js send data to Mixpanel.
Does Viewer3D.js has an option to stop sending to Mixpanel?
Google Chrome DevTools - Network1
Google Chrome DevTools - Network2
Google Chrome DevTools - Sources
Edit
Now with the upcoming Viewer v7.18 (to be released soon as of now) it's possible to opt out of data collection - and it defaults to opted out...
Autodesk.Viewing.Private.analytics.optIn()
Autodesk.Viewing.Private.analytics.optOut()
Original Answer
Viewer v7.16 and onwards introduced user behavior collection which is by default enabled (see here for relevant statements) and we are still working on an interface to opt out of it.
While we do that you can fall back to v7.14 or earlier unless you strongly require the latest features as of v7.14- let me know if that's the case and I'd try figure out a workaround for you ...
<script src='http://developer.api.autodesk.com/modelderivative/v2/viewers/viewer3D.min.js?v=7.14'></script>

Getting Serial port info on Chrome Web Serial API

I'm using the Chrome Web Serial API. So far it's working fine, but now and I'm trying to get the (already opened) port metadata (port name, device ID, etc.) and I'm a bit lost.
Here are the steps to follow:
https://wicg.github.io/serial/#getting-serial-port-metadata
but so far I cannot get the information.
If I try by navigating the port class, the DevTools console trows "ƒ () { [native code] }".
I cannot find a suitable example of how to implement this.
Does anyone have a hint?
Thanks in advance!!
Daniel.
It seems like it hasn't been implemented in Chromium yet. Keep in mind that the specs are sort of guides for vendors to follow when implementing a feature, but the actual shipped implementation can differ.
If you check the Web Serial API's code in the Chromium repo for Chrome 80 (current version at the time of writing) and 84.0.4112.1 you'll see that they only include the following methods:
open
readable
writable
getSignals
setSignals
close
You can read the latest comments on this API here: https://bugs.chromium.org/p/chromium/issues/detail?id=884928

Permission issue for appium chrome borwser

I am implementing an appium test on remote android driver, with chrome browser for loading urls.
Some of the Urls are pdfs, and chrome asks to store those files. and appears that chrome doesnt have access to filesystem to store those files, which results in a dialog like below.
Please help me pass that dialog without any manual inputs.
Upon clicking continue, it will load actual permissions dialog from Android.
Here is my code initialize appium capabilities
DesiredCapabilities caps = DesiredCapabilities.android();
caps.setCapability("appiumVersion", "1.9.1");
caps.setCapability("deviceName","Samsung Galaxy S9 Plus HD GoogleAPI Emulator");
caps.setCapability("deviceOrientation", "portrait");
caps.setCapability("browserName", "Chrome");
caps.setCapability("platformVersion", "8.1");
caps.setCapability("platformName","Android");
caps.setCapability("autoAcceptAlerts", true);
caps.setCapability("autoGrantPermissions", true);
caps.setCapability("chromedriverArgs", "--allow-file-access-from-files");
caps.setCapability("maxDuration", 10000);
and this is the snippet I use to load a Url
driver.navigate().to("http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf");
autoGrantPermission also doesnt work in this case because chrome is already installed. Appium team has already rejected this issue -
https://github.com/appium/appium/issues/10008
Please help!
Indeed I had very hard time finding out the solution, but eventually I found a workaround.
The best workaround would have been reinstalling the chrome package. I tried that, but I could not start chrome after reinstalling it, as I had no access to shell, and chromedriver complained. So I left that track.
I tried getting hold of adb command or mobile:changePermissions but for that you need to use server flag --relaxed-security while starting the server, and saucelabs doesnt provide any handy interface to start the server with this flag.
The last resort, I found a solution here - https://stackoverflow.com/a/51241899/4675277 . But just that was not sufficient, because it helped me fix chrome alert, but later on it popped up with another alert with allow and deny, for which another solution in the same question helped me. So this is the code I eventually used -
driver.navigate().to("http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf");
String webContext = ((AndroidDriver)driver).getContext();
Set<String> contexts = ((AndroidDriver)driver).getContextHandles();
for (String context: contexts){
if (context.contains("NATIVE_APP")){
((AndroidDriver)driver).context(context);
break;
}
}
driver.findElement(By.id("android:id/button1")).click();
contexts = ((AndroidDriver)driver).getContextHandles();
for (String context: contexts){
if (context.contains("NATIVE_APP")){
((AndroidDriver)driver).context(context);
break;
}
}
driver.findElement(By.id("com.android.packageinstaller:id/permission_allow_button")).click();
((AndroidDriver)driver).context(webContext);
This helps allow all permissions required.

Incomplete Implementation of CTAP2 (FIDO2) protocol in Chrome?

I've been investigating the implementation of CTAP2 protocol with Google Chrome (protocol between Fido Authenticator and Fido Client (e.g. Chrome)), which should be supported in Chrome since version 69.
So I dumped the chrome request to the authenticator in two cases:
1. U2F (CTAP1) with yubico demo website.
Here everything goes as expected and chrome follows the CTAP1 protocol.
2. FIDO2/Webauthn (CTAP2) with webauthn.org
And the browser has a strange behaviour:
It starts by following the CTAP2 protocol by sending a AuthenticatorGetInfoRequest
The Authenticator replies with AuthenticatorGetInfoResponse
But then Chrome switches to the CTAP1 protocol by sending a Registration Request Message (U2F_REGISTER)
Is it a problem with Chrome implementation: CTAP2 is not enabled entirely yet (it seems to be implemented in Chromium sources)?
Or is the problem coming from the authenticator: sending a response that makes Chrome switch to CTAP1?
Or something else entirely?
In AuthenticatorGetInfoRequest, the authenticator must respond with a string list of the supported versions among "U2F_V2" and "FIDO_2_0". Note also in case of NFC or CCID, a "FIDO_2_0" (CTAP2) only authenticator shall anwser directly "FIDO_2_0" on the SELECT command. I don't know about HID and BLE.
So maybe your authenticator is listing "U2F_V2" in the protocol versions list in AuthenticatorGetInfoRequest.
I also imagine the Chrome code base about this was moving fast and can be partial or not strict. To my tests in early 2020, the Chrome CTAP capabilities seem now stable and compliant.

Attempt to postMessage on disconnected port

I was following this guide on native messaging, but now I've come to a stand-still. The developer console on Firefox keeps giving me the same error:
"Attempt to postMessage on disconnected port" along with "Webconsole context has changed" before it.
I've checked the registries, the ping_pong registry key is in the correct place,
HKEY_LOCAL_MACHINE\\SOFTWARE\\Mozilla\\NativeMessagingHosts\\ping_pong,
and it's value is pointing to the location of my manifest.json file.
My extension id and "allowed_extensions" match.
I found this, and it did stop at the end saying I don't have a python script in the batch file, but that shouldn't be the cause of my error messages.
I have Firefox Quantum 61.0.2, if that's of any use.
What am I doing wrong?
This is a generic error and it means the native messaging host configuration is wrong. The specific error is logged in the Browser Console (Firefox Menu --> Web Developer --> Browser Console) and it is much more helpful.
(For me, the specific error was a typo in the native messaging manifest.)
(Discussed in: https://github.com/mdn/webextensions-examples/issues/266)