Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE) - exception

I spent 2 days trying to figure out this error and would like to share the resolution
Problem:
I am trying to reconfigure extjs grid panel at runtime with different datastore
Code with Error:
var el = Ext.getCmp('DummyGrid');
el.reconfigure(SLADataStore, SLAColumnModel);
el.load();
Error:
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js
code without Error:
var el = Ext.getCmp('DummyGrid');
el.reconfigure(SLADataStore, SLAColumnModel);
SLADataStore.load({
params: { start: 0,
limit: 25,
sort: 'LevelID',
dir: 'ASC'}
});
Reason for the error: when I try to load it should have been datastore.load() not the component.load()
Hope this post might help 2 days of their time which might be well spent on beers ;)
-Sat

Try
el.getStore().load();

Related

Error: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)

I am working on SQfLite database. I am trying to save data but getting an error during saving data. I am using Chrome to check my output. The error is No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider). Here is a code which i think having a problem.
Directory documentsDirectory = await getApplicationDocumentsDirectory();
String path = join(documentsDirectory.path, "student.db");
return await openDatabase(path, version: 1, onCreate: _onCreate);
Here is a code for inserting data:
Database? db = await instance.database;
var id = await db!.insert('student', data);
I am using Chrome for checking output, may be this is a reason for error or whatever reason please guide me.
Plugins added
sqflite: ^2.0.2+1
get: ^4.6.5
path_provider: ^2.0.11
the error is:
Error: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)
at Object.throw_ [as throw] (http://localhost:65116/dart_sdk.js:5067:11)
at MethodChannel._invokeMethod (http://localhost:65116/packages/flutter/src/services/restoration.dart.lib.js:1560:21)
at _invokeMethod.next ()
at http://localhost:65116/dart_sdk.js:40571:33
at _RootZone.runUnary (http://localhost:65116/dart_sdk.js:40441:59)
at _FutureListener.thenAwait.handleValue (http://localhost:65116/dart_sdk.js:35363:29)
at handleValueCallback (http://localhost:65116/dart_sdk.js:35931:49)
at _Future._propagateToListeners (http://localhost:65116/dart_sdk.js:35969:17)
at [_completeWithValue] (http://localhost:65116/dart_sdk.js:35817:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:65116/dart_sdk.js:35838:35)
at Object._microtaskLoop (http://localhost:65116/dart_sdk.js:40708:13)
at _startMicrotaskLoop (http://localhost:65116/dart_sdk.js:40714:13)
at http://localhost:65116/dart_sdk.js:36191:9

puppeteer-extra-plugin-recaptcha NOT SOLVING CAPTCHAS PROPERLY

Im having an issue solving captchas using puppeteer-extra and puppeteer-extra-plgin-recaptcha. Everything was going very smooth and randomly it broke. It is definitely some issue with not returning the captcha token but im not sure how to fix it. Here is some info.
This is my code initializing it
puppeteer.use(
RecaptchaPlugin({
provider: {
id: '2captcha',
token: 'token' // REPLACE THIS WITH YOUR OWN 2CAPTCHA API KEY ⚡
},
visualFeedback: true // colorize reCAPTCHAs (violet = detected, green = solved)
})
)
This is where i call it
await page.solveRecaptchas()
This is the error
PuppeteerExtraPluginRecaptcha: An error occured during "getRecaptchaSolutions": {
_vendor: 'recaptcha',
provider: '2captcha',
id: '97j1ixpkm2h',
requestAt: 2021-07-24T17:26:54.251Z,
error: 'Error: 2captcha error: Missing response data: undefined'
}
If anyone can help it would be greatly appreciated.

uncaught exception: INVALID_TOKEN | (intermediate value).forEach is not a function with AJAX response(JSON format)

I am getting error uncaught exception: INVALID_TOKEN (intermediate value).forEach is not a function
My code is:
$('#start')
.on('click', function() {
$.getJSON('/twillio-new/token.php', {
name: $('#my-name')
.val(),
identity: $('#my-identity')
.val()
}, function(data) {
// Create the endpoint, and then initialize the main calling app
var endpoint = new Twilio.Endpoint(data.token);
$('#startDiv')
.hide();
$('#callDiv')
.show();
init(endpoint);
});
});
JSON Response:
{"name":"cool
room","identity":"test","token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJlMWE3NTI4YzYyMzdiMGE0MmZlYTc0NDk2MjRlOTFiNC0xNTA3MjEwNjQyIiwiaXNzIjoiZTFhNzUyOGM2MjM3YjBhNDJmZWE3NDQ5NjI0ZTkxYjQiLCJzdWIiOiJBQzVlMTVhMDg5NjVkNWRjM2ZkOWI3YmNiOGMyM2FhMjgxIiwiZXhwIjoxNTA3MjE0MjQyLCJncmFudHMiOnsiaWRlbnRpdHkiOiJ0ZXN0IiwidmlkZW8iOnsicm9vbSI6IiRuYW1lIn19fQ.pvfGEoVripcjq588p8l3QixuVJ4sHBjMdmWa8tspTtY"}
I am generating and getting access token for Twilio Video calling api using this. Please let me know what is wrong with this code?
Which SDK do you have installed? I have seen this error when the code being used was for the incorrect SDK. Looks like the code you are using is for the version 5. Do you have version 5 installed? There have been numerous version based issues with Twilio

Identifying (gulp-)eslint error reason

I have this piece of code:
sendMessage(message) {
let data = {
message
};
this.socket.send('message', data);
}
I'm using eslint and set the object-shorthand rule.
"object-shorthand": [
2,
"always"
],
And get this error:
---
message: 'Unexpected token }'
severity: error
data:
line: 39
column: 14
ruleId: ''
...
But why? Any other way to find what rule is being violated?
If I do this:
sendMessage(message) {
let data = {
message: message
};
this.socket.send('message', data);
}
I get this:
---
message: Expected property shorthand.
severity: error
data:
line: 38
column: 17
ruleId: object-shorthand
...
It's clear what's wrong. Great.
So, how can I find what's going on? eslint is asking for object shorthands (as I told it to) but it is not accepting them... For some other reason?
Having these errors showing up all the time is distracting.
Any help is highly appreciated.
(I'm using the latest gulp-eslint: 1.0.0)
My guess is that the fact that eslint says ruleId: '' points to a bug in eslint, not in your code. You should
search in eslint's open issues (I have tried, but found nothing)
if this bug is not reported, produce a minimal code displaying the bug (sorry, I don't have the time to setup things to do so myself)
if successful, open a new issue

Using Dart, Web_UI and Google Maps in a slightly more complicated way

I'm trying to integrate the google maps library with a dart app I've been trying to build that also uses web_ui, all that I'm getting is a lot of very frustrating errors. I downloaded the examples at the dart google maps example on github and those work just fine.
However when I try to pull it together in a bit more of a "real" app nothing works. Here are the errors I'm getting:
Breaking on exception: ReferenceError: ReceivePortSync is not defined
Uncaught ReferenceError: ReceivePortSync is not defined
ProxiedObjectTable (:54:21)
(:195:28)
(:567:3)
Breaking on exception: The null object does not have a method 'callSync'.
Exception: The null object does not have a method 'callSync'.
NoSuchMethodError : method not found: 'callSync'
Receiver: null
Arguments: [GrowableObjectArray len:0]
Object.noSuchMethod (dart:core-patch/object_patch.dart:20:25)
_enterScope (package:js/js.dart:756:35)
scoped (package:js/js.dart:745:26)
AlertDetailsComponent.renderMap (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertDetails.dart:381:14)
AlertDetailsComponent.loadAlertDetailsData (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertDetails.dart:321:25)
AlertsBodyComponent.viewAlertDetails (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertsBody.dart:232:36)
AlertsBodyComponent.created_autogenerated.<anonymous closure>.<anonymous closure> (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertsBody.dart:146:60)
Template.listen.<anonymous closure> (package:web_ui/templating.dart:426:53)
_enterScope (package:js/js.dart:756:35)
scoped (package:js/js.dart:745:26)
Exception: The null object does not have a method 'callSync'.
NoSuchMethodError : method not found: 'callSync'
Receiver: null
Arguments: [GrowableObjectArray len:0]
Object.noSuchMethod (dart:core-patch/object_patch.dart:20:25)
_enterScope (package:js/js.dart:756:35)
scoped (package:js/js.dart:745:26)
AlertDetailsComponent.renderMap (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertDetails.dart:381:14)
AlertDetailsComponent.loadAlertDetailsData (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertDetails.dart:321:25)
AlertsBodyComponent.viewAlertDetails (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertsBody.dart:232:36)
AlertsBodyComponent.created_autogenerated.<anonymous closure>.<anonymous closure> (http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/AlertsBody.dart:146:60)
Template.listen.<anonymous closure> (package:web_ui/templating.dart:426:53)
_enterScope (package:js/js.dart:756:35)
scoped (package:js/js.dart:745:26)
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/js/jquery.js
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1:3030/Users/ao85407/Development/Dart/BDProjects/adminConsoleV2/web/out/js/bootstrap.js
What is happening in the code is that when the component is rendered I get handle on a custom "Alert" object and use it to build a map with this function:
Object renderMap(Alert alert)
{
final lat = double.parse(alert.latitude);
final lng = double.parse(alert.longitude);
final mapOptions = new MapOptions()
..zoom = 14
..center = new LatLng(lat, lng)
..mapTypeId = MapTypeId.ROADMAP;
final map = new GMap(query("#map-canvas"), mapOptions);
js.retain(map);
//clever troubleshooting/debugging methods
map.onZoomChanged.listen((ignored)
{
print ('zoom: ${map.zoom}');
});
return map;
}
The crash happens when I try to create the MapOptions and nothing I've tried works. I'm guessing that it has to do with the page lifecycle and when libraries are being loaded since I'm a few pages away from the main method of my application dart file.
Any suggestions would be great!
Thanks!
You have to use the following Js script on your page to use js-interop :
<script src="packages/browser/interop.js"></script>
See BREAKING CHANGE: js-interop will require extra script in html.