I am facing this issue on checkout page of Magento. It where we load Shipping methods. I can't see any workaround for the same.
knockout.js:3381 Uncaught ReferenceError: Unable to process binding "foreach: function(){return shippingRateGroups }"
Message: Unable to process binding "foreach: function(){return $parent.getRatesForGroup($data) }"
Message: Unable to process binding "if: function(){return carrier_code !='vendor_rates' }"
Message: Unable to process binding "if: function(){return (available) }"
Message: Unable to process binding "text: function(){return method_title }"
Message: method_title is not defined
at text (eval at createBindingsStringEvaluator (knockout.js:2982), <anonymous>:3:57)
at update (knockout.js:4659)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3373)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140)
at Function.evaluateImmediate (knockout.js:2101)
at Object.ko.computed.ko.dependentObservable (knockout.js:1954)
at knockout.js:3371
at Object.arrayForEach (knockout.js:159)
at applyBindingsToNodeInternal (knockout.js:3343)
Related
I have an error when connecting to the MongoDB Atlas database after I migrated the data from the old MLAB.
I have definitely setup the username and password correctly as in the documentation (obviously i replaced PASSWORD with my correct MLAB password:
var mongoURI = 'mongodb+srv://heroku_3kcdl3j9:PASSWORD#cluster-3kcdl3j9.auof1.mongodb.net/heroku_3kcdl3j9?retryWrites=true&w=majority';
I have migrated my database from MLAB to Atlas successfully set the correct Network access settings to 0.0.0.0 IP address. Setup the environment variable in Heroku.
I connect to the atlas database with this code, do I need some special options? (this code works with the old MLAB connection)
mongoose.connect(mongoURI,
// { config: { autoIndex: true } },
// { options : { ssl: true } },
function (error) {
if (error) console.error(error);
else console.log('mongo connected');
const con = new mongoose.mongo.Admin(mongoose.connection.db)
con.buildInfo( (err, mongoURI) => {
if(err){
throw err
}
// see the db version
// console.log('mongo db.version(): '+ db.version);
})
});
However, I still get this error, I don't know what I am doing wrong:
{ MongoError: authentication fail
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/topologies/replset.js:1462:15
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/connection/pool.js:868:7
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/connection/pool.js:844:20
at finish (/Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/auth/scram.js:232:16)
at handleEnd (/Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/auth/scram.js:242:7)
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/auth/scram.js:351:15
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/connection/pool.js:531:18
at process._tickCallback (internal/process/next_tick.js:61:11)
name: 'MongoError',
message: 'authentication fail',
errors:
[ { name: 'cluster-3kcdl3j9-shard-00-01.auof1.mongodb.net:27017',
err: [MongoError] },
{ name: 'cluster-3kcdl3j9-shard-00-00.auof1.mongodb.net:27017',
err: [MongoError] },
{ name: 'cluster-3kcdl3j9-shard-00-02.auof1.mongodb.net:27017',
err: [MongoError] } ],
[Symbol(mongoErrorContextSymbol)]: {} }
(node:47015) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 's' of undefined
at Admin.buildInfo (/Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb/lib/admin.js:100:37)
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/index.js:95:13
at $initialConnection.then.err (/Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongoose/lib/connection.js:556:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:47015) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:47015) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:47015) UnhandledPromiseRejectionWarning: MongoError: authentication fail
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/topologies/replset.js:1462:15
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/connection/pool.js:868:7
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/connection/pool.js:844:20
at finish (/Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/auth/scram.js:232:16)
at handleEnd (/Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/auth/scram.js:242:7)
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/auth/scram.js:351:15
at /Users/bensmith/Downloads/DocumentsDirNew/Scraper and API/diveapi/node_modules/mongodb-core/lib/connection/pool.js:531:18
at process._tickCallback (internal/process/next_tick.js:61:11)
(node:47015) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
On the migration documentation from MLAB to ATLAS I can read:
Atlas servers always run with requireSSL and only accept TLS/SSL encrypted connections.
I can see that your ssl option is commented.
This is one problem.
The problem was it was something to do with the username and password. I believe there was an illegal character in the password. So I created another user with a better password and the server authenticated and logged in allowing it to connect.
I have installed the GitHub auto-deployer for Google Cloud Functions, but when I now push my function into my GitHub repository, I receive an abstract error message "The request has errors" with the following rather non-descript details. What could specifically be going wrong here?
E githubAutoDeployer [CODE] 2017-12-30 19:19:37.362
Failed to create function projects/[MY_BUCKET]/locations/us-central/functions/[MY_FUNCTION] { Error: The request has errors
at Request._callback (/user_code/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:85:15)
at Request.self.callback (/user_code/node_modules/googleapis/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
code: 400,
errors:
[ { message: 'The request has errors',
domain: 'global',
reason: 'badRequest' } ] }
E githubAutoDeployer [CODE] 2017-12-30 19:19:37.363 Error: The request has errors
at Request._callback (/user_code/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:85:15)
at Request.self.callback (/user_code/node_modules/googleapis/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
D githubAutoDeployer [CODE] 2017-12-30 19:19:37.365
Function execution took 2319 ms, finished with status code: 500
UPDATE The mentioning of google-auth-library in the stack trace made me think that something may be wrong with my credentials. But the output from gcloud auth list appears alright:
Credentialed Accounts
ACTIVE ACCOUNT
* [MY_ID]#gmail.com
UPDATE What is perhaps slightly unconventional is that I have "path":"", in my config.json. But then my index.js resides directly at the top of my repository, so there is no path to specify.
UPDATE This is where the error from Google Cloud Functions is passed on by githubAutoDeployer (unfortunately source code for the upstream server is apparently not available):
gcf.projects.locations.functions.create({ resource, location }, (err, operation) => {
if (err && err.errors && err.errors[0] && err.errors[0].reason === 'alreadyExists') {
// ...
} else if (err) {
console.error(`Failed to create function ${resource.name}`, err);
reject(err);
}
The trouble was that I was specifying "location" : "us-central" instead of us-central1 (which supports Google Cloud Functions) in my config.json.
I found out by sending a raw POST request to the Google Cloud Functions API (after obtaining a service account and access token, etc.). At this level the API returns a clear error indication:
"fieldViolations": [
{
"field": "region",
"description": "region us-central is not supported."
}
]
Apparently and unfortunately this does not enter any of the log files when githubAutoDeployer attempts the same call.
"Export Queries" does not work in the Query tab of the Web Interface, so I tried to manually create json with the query and import it, but the following definition is not clear:
Format:
JSON documents embedded into a list:
[{
"name": "Query Name",
"value": "Query Definition",
"parameter": "Query Bind Parameter as Object"
}]
What escaping should have the value, whether parameter is mandatory and what is the format in case multiple bind parameters are defined.
I was not able to import the following script:
[{
name: "Create Random Complex Users (num, outpUsers)",
value: '// Create specified number of users in the users Vertex collection
FOR i IN 1..#usersNum
INSERT {
id: 100000 + i,
age: 18 + FLOOR(RAND() * 50), // RAND generate float E {0, 1]
name: CONCAT('user', TO_STRING(i)),
} IN ##users'
}
]
What is wrong and how should it be fixed?
NOTE:
ArangoDB version: arangosh (ArangoDB 3.0.10 [linux] 64bit, using VPack 0.1.30, ICU 54.1, V8 5.0.71.39, OpenSSL 1.0.1f 6 Jan 2014)
Using the JSON fixed by #mpv1989 the following error appears in the Web Inetface: Query error: queries could not be imported.
And the following message is in the log using DB named test under the root user:
2016-10-26T12:31:28Z [31690] ERROR Service "/_admin/aardvark" encountered error 500 while handling POST http://localhost:8529/_db/test/_admin/aardvark/query/upload/root
2016-10-26T12:31:28Z [31690] ERROR ArangoError: users can only be used in _system database
2016-10-26T12:31:28Z [31690] ERROR at getStorage (/usr/share/arangodb3/js/server/modules/#arangodb/users.js:93:17)
2016-10-26T12:31:28Z [31690] ERROR at Object.exports.document (/usr/share/arangodb3/js/server/modules/#arangodb/users.js:291:17)
2016-10-26T12:31:28Z [31690] ERROR at Route._handler (/usr/share/arangodb3/js/apps/system/_admin/aardvark/APP/aardvark.js:153:18)
2016-10-26T12:31:28Z [31690] ERROR at next (/usr/share/arangodb3/js/server/modules/#arangodb/foxx/router/tree.js:386:15)
2016-10-26T12:31:28Z [31690] ERROR at /usr/share/arangodb3/js/node/node_modules/lodash/lodash.js:9378:25
2016-10-26T12:31:28Z [31690] ERROR at Middleware.authRouter.use (/usr/share/arangodb3/js/apps/system/_admin/aardvark/APP/aardvark.js:78:3)
2016-10-26T12:31:28Z [31690] ERROR at next (/usr/share/arangodb3/js/server/modules/#arangodb/foxx/router/tree.js:388:15)
2016-10-26T12:31:28Z [31690] ERROR at next (/usr/share/arangodb3/js/server/modules/#arangodb/foxx/router/tree.js:384:7)
2016-10-26T12:31:28Z [31690] ERROR at next (/usr/share/arangodb3/js/server/modules/#arangodb/foxx/router/tree.js:384:7)
2016-10-26T12:31:28Z [31690] ERROR at next (/usr/share/arangodb3/js/server/modules/#arangodb/foxx/router/tree.js:384:7)
However, the fixed JSON can be SUCCESSFULLY imported to the _SYSTEM database! Thank you #mpv1989.
It seems, persistence and import of the Queries snippets works only for the _SYSTEM DB...
What error message do you get when exporting/importing?
For your workaround, I exported your query from the Web Interface. Here is the result:
[{
"name": "Create Random Complex Users (num, outpUsers)",
"value": "// Create specified number of users in the users Vertex collection\nFOR i IN 1..#usersNum\n INSERT {\n id: 100000 + i,\n age: 18 + FLOOR(RAND() * 50), // RAND generate float E {0, 1]\n name: CONCAT('user', TO_STRING(i))\n } IN ##users",
"parameter": {
"usersNum": 100,
"#users": "users"
}
}]
The field parameter is a Json Object. If you do not have any bind parameter just write an empty object "parameter": {}.
I've got a problem with separated protractor specs. I've trying to divide 1 test 1 spec. And got a error message like
E/launcher - Cannot read property 'forEach' of undefined
E/launcher - TypeError: Cannot read property 'forEach' of undefined
at C:\Users\mako\AppData\Roaming\npm\node_modules\jasmine2-protractor-utils\reporter\jasmine2_reporter.js:112:24
at Array.forEach (native)
at self.jasmineDone (C:\Users\mako\AppData\Roaming\npm\node_modules\jasmine2-protractor-utils\reporter\jasmine2_reporter.js:108:16)
at dispatch (C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1966:28)
at ReportDispatcher.jasmineDone (C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1
949:11)
at C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:758:18
at QueueRunner.clearStack (C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:660:9)
at QueueRunner.run (C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1881:12)
at C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1898:16
at C:\Users\mako\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1842:9
E/launcher - Process exited with error code 199
Test cases are running properly, error happens after all suites are done.
Problem disappear if spec have more than on "it" even empty. Have you got any ideas what can be a problem?
I would suggest to add a piece of code which returns a promise , to your onPrepare block of Protractor configuration file.
For Example:
onPrepare: function () {
// returning the promise makes protractor wait for the reporter config before executing tests
return global.browser.getProcessedConfig().then(function (config) {
});
}
I "solve" problem.
/*plugins: [{
package: 'jasmine2-protractor-utils',
disableHTMLReport: false,
disableScreenshot: false,
screenshotPath:'./test_results/E2E/screenshots',
screenshotOnExpectFailure:true,
screenshotOnSpecFailure:true,
clearFoldersBeforeTest: true,
htmlReportDir: './test_results/E2E/htmlReports',
/*failTestOnErrorLog: {
failTestOnErrorLogLevel: 900,
excludeKeywords: ['keyword1', 'keyword2']
}*/
// }],
And the problem is with plugin 'jasmine2-protractor-utils'. If I've got two specs and one test each error happens. Without this plugin or if I add empty test to one of them it works fine.
I have an attribute in Fiware-Orion with type Point, as follows,
{
"name": "Coords",
"type": "geo:point",
"value": "LATITUDE,LONGITUDE"
}
and Cygnus is subscribed to Orion. When Cygnus PostgreSQLSink is receiving the event and it tries to store it in the PostgreSQL database I'm getting the following error
WARN sinks.OrionSink: Bad context data (ERROR: invalid input syntax for type point: "[]"
What should I use in Fiware-Orion?