Uncaught TypeError: e.initKeyEvent is not a function
I'm a web developer. The browser extension fails to fill in values into my form. This appears to happen on Windows and MacOS when using Chrome. When I try to fill in the form, the console.log shows:
Uncaught TypeError: e.initKeyEvent is not a function
The extension seems to work fine everywhere except for my form. I'm developing the site locally before I deploy, so the page is at localhost:8080. My form is really simple, it has a Username and Password field. There are 2 forms on the page however, is this making the extension confused?
1Password Version: 6.3.3 (19)
Extension Version: 4.6.1.90
OS Version: Windows 10 & OSX 10.11
Sync Type: Not Provided
Comments
-
Hmm, trying to upload the .html and it says file not allowed. Tried to upload a .zip, same thing. Pasting the html in this comment tries to render the html...
0 -
<!DOCTYPE html>
<html>
<head>
<title>Peach Customer Portal</title>
<meta name="viewport" content="width=device-width">
<link href="assets/css/1.3.0/default/bootstrap.min.css" media="all" rel="stylesheet" type="text/css" id="bootstrap-css">
<link href="assets/css/1.3.0/default/adminflare.min.css" media="all" rel="stylesheet" type="text/css" id="adminflare-css">
<link href="assets/css/1.3.0/pages.css" media="all" rel="stylesheet" type="text/css">
<style></style>
</head>
<body class="signin-page"><section id="signin-container" style="margin-top: 19.5px; width: 370px">
<div class="header text-center" style="color: #CCC">
<img src="Images/peach_fuzzer-white.png" alt="Peach Fuzzer Professional">
<h4>
Welcome to the Peach Fuzzer download site!
</h4>
<p>
There are two login method available for Peach Fuzzer customers.
If you're not sure which login to use, please contact
<a href="mailto:licensing@peachfuzzer.com">licensing@peachfuzzer.com</a>.
</p>
<hr />
<h4>
<b>FuzzFlex Users</b>
</h4>
<p>
After authenticating using your operations portal credentials,
you will be able to access the Peach Fuzzer downloads.
</p>
</div>
<form id="flex" method="post">
<fieldset>
<div class="fields">
<input type="text" id="Username" name="Username" placeholder="Username" tabindex="1" required autofocus style="padding: 0 15px">
<input type="password" id="Password" name="Password" placeholder="Password" tabindex="2" required style="padding: 0 15px">
<input type="hidden" id="KindFlex" name="Kind" value="flex">
</div>
<button type="submit" class="btn btn-primary btn-block" tabindex="4">Sign In</button>
</fieldset>
</form>
<hr />
<div class="header text-center" style="color: #CCC">
<h4>
<b>Professional & Enterprise Users</b>
</h4>
<p>
After authenticating with a valid license file,
you will be able to access the Peach Fuzzer downloads.
</p>
</div>
<form id="port" method="post" enctype="multipart/form-data">
<fieldset>
<div class="fields">
<input type="file" id="LicenseFile" name="LicenseFile" style="padding: 0 15px">
<input type="hidden" id="KindPort" name="Kind" value="port">
</div>
<button type="submit" class="btn btn-primary btn-block">Sign In with License</button>
</fieldset>
</form></section>
</body>
</html>0 -
Greetings @flaub,
Are you using a tool to help create the form or did you write everything by hand or have the ability to manually alter any aspect? The reason I ask is a small change should see 1Password work here if you don't mind.
We need to make improvements but for the moment we check for the presence of the
port
object as it's how the global script communicates with the end script in Firefox. We use this knowledge when simulating keyboard events which despite the great claims made by the various browsers still require use of deprecated functions for the events to properly fire and differ depending on the browser. So I believe if you were to change the id for the second form you should find our error disappears. The real issue though does lie with us but this will allow you to get things working right now rather than having to wait on us.So it turns out this is related to what Jamie was thinking about when he asked for the markup in that it's the same underlying issue but a twist on it.
0 -
That was totally it. Thanks a bunch. I just happened to use a 'reserved' element id. I removed the element id since it's not really needed for my use case.
0 -
I'm glad that was it, @flaub. Like Lil Bobby said, this is something we need to address on our side, but here is a description of the problem as we reported it to the Chromium team. We have some plans for updating our code base and the way it supports multiple browsers to make this kind of problem much less likely (I want to say impossible, but I've been on the Internet too long to say that…) but I don't have a timeframe to share for when that might happen. In any case, I'm glad it's working for you now. :) Let us know if we can help with anything else.
0 -
Thanks for the update.
Perhaps until a more permanent fix is found, the global variables used in your extension should be made sufficiently unique so that random web pages won't collide with it?
0 -
port
is not our variable. It's something defined by Firefox. Our extension code checks for various objects' presence to divine which browser environment we're currently in and has different paths for each. We don't define theport
variable at all; we're just checking to see if it exists in the global scope. The bug I linked to describes a situation where our scripts' global context is being polluted by page variables in a way that is not supposed to be possible given the architecture of the browser extension frameworks and the sandboxed execution context that the browser is supposed to use to evaluate both the page's and the extension's code.0