Form view triggering error when submitted - nativescript

I am very new to NativeScript (few hours) and I am trying to follow the tutorial on their site. When running the code at step 12 of the tutorial, the app is failing (when I submit the login form only) and crashes with the following error stack:
2018-10-10 20:35:06.321 nsplaydev[2295:419329] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: user.login is not a function. (In 'user.login()', 'user.login' is undefined)
at
1 signIn#file:///app/views/login/login-page.js:17:15
2 notify#file:///app/tns_modules/tns-core-modules/data/observable/observable.js:110:31
3 _emit#file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24
4 tap#file:///app/tns_modules/tns-core-modules/ui/button/button.js:207:24
5 UIApplicationMain#[native code]
6 start#file:///app/tns_modules/tns-core-modules/application/application.js:272:26
7 run#file:///app/tns_modules/tns-core-modules/application/application.js:300:10
8 anonymous#file:///app/app.js:2:22
9 evaluate#[native code]
10 moduleEvaluation#[native code]
11 #[native code]
12 promiseReactionJob#[native code]
', reason: '(null)'
*** First throw call stack:
(0x211e5bf78 0x211054284 0x102e67e60 0x102e8d2e4 0x10378f088 0x1037901b4 0x21104f900 0x23f731a98 0x23f19be18 0x23f19c14c 0x23f19b0ec 0x23f76d208 0x23f76e468 0x23f74cb70 0x23f81d024 0x23f81fb50 0x23f81fec8 0x23f81854c 0x211de8a50 0x211de89cc 0x211de8284 0x211de2f64 0x211de2844 0x214091be8 0x23f73031c 0x103790044 0x10378e7a4 0x10378e26c 0x102e45630 0x103440e14 0x103449a24 0x103449a34 0x103449a34 0x103442ee0 0x1033dc198 0x1033b1e94 0x103546b9c 0x102e5a354 0x1035e2964 0x10344a494 0x103449a34 0x103449a34 0x103449a34 0x103442ee0 0x1033dc198 0x1033b1e94 0x103546c80 0x1035de8e0 0x102e51898 0x102e97f50 0x102ac8198 0x10257d3dc 0x211898020)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-10-10 20:35:06.321 nsplaydev[2295:419329] PlayLiveSync: Uncaught Exception
To learn the framework, I was purposefully typing each line manually to learn. Thought that could have introduced the error, so I went back and copy pasted their exact code. Still getting an issue.
Update: The link to the tutorial is here
Thanks

Based on the error log it looks like you haven't defined login function in your view model.

Related

Cakephp build error - getSchemaCollection

I am quite new to cake and ran through a tutorial and had everything working however i am developing for real now.
I have a database set-up and the cake intro page says i am connecting to it, however when i do a “cake bake” on a table i get the following errors.
2018-06-13 20:06:44 Error: [Error] Call to a member function getSchemaCollection() on null in C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\ORM\Table.php on line 547
I don’t usually like to ask for help but i have searched and search for info on getSchemaCollection and can’t find anything!
The stack trace was
The stack trace was
One moment while associations are detected.
Exception: Call to a member function getSchemaCollection() on null in [C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\ORM\Table.php, line 547]
2018-06-15 11:45:46 Error: [Error] Call to a member function getSchemaCollection() on null in C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\ORM\Table.php on line 547
Stack Trace:
0 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(415): Cake\ORM\Table->getSchema()
1 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(231): Bake\Shell\Task\ModelTask->findHasMany(Object(App\Model\Table\PurchaseTable), Array)
2 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(130): Bake\Shell\Task\ModelTask->getAssociations(Object(App\Model\Table\PurchaseTable))
3 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(113): Bake\Shell\Task\ModelTask->getTableContext(Object(App\Model\Table\PurchaseTable), ‘purchase’, ‘Purchase’)
4 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(100): Bake\Shell\Task\ModelTask->bake(‘Purchase’)
5 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\BakeShell.php(272): Bake\Shell\Task\ModelTask->main(‘Purchase’)
6 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Collection\CollectionTrait.php(51): Bake\Shell\BakeShell->Bake\Shell{closure}(‘Purchase’, 0)
7 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\BakeShell.php(273): Cake\Collection\Collection->each(Object(Closure))
8 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Console\Shell.php(518): Bake\Shell\BakeShell->all(‘purchase’)
9 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Console\CommandRunner.php(342): Cake\Console\Shell->runCommand(Array, true)
10 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Console\CommandRunner.php(164): Cake\Console\CommandRunner->runShell(Object(Bake\Shell\BakeShell), Array)
11 C:\xampp\htdocs\bookmarker\bin\cake.php(12): Cake\Console\CommandRunner->run(Array)
12 {main}
And the version is 3.6.4
Jon
Did your table name is purchase and not purchases ?

Parse.com CloudCode beforeSave trigger errors

Context: parse.com CloudCode, executing beforeSave() trigger on data object object update.
Getting a rash of unexplained errors in simple trigger function (code below). The errors are mostly
Result: Uncaught undefined
but there are also several
Result: Execution timed out
The code is simple, I have checked it to the point where I don't think this is an error due to the code, but including it anyway since I know people will ask to see it.
This seems (seems!) to be an issue in Parse itself, which I've been unable to solve.
Parse.Cloud.beforeSave("LogoItem", function(request, response) {
var name = request.object.get("productName");
if (typeof name == "undefined") {
name = "";
}
request.object.set("lowercaseName", name.toLowerCase());
response.success(); // Tells parse not to cancel save
});
My question is, has anyone seen this and been able to get any handle on a solution?
Below is some additional detail (logs from parse) that likely won't be too useful (but never know)...
E2016-03-14T14:12:26.306Z] - v643 Ran job ShopSenseJob with:
Input: {"plan":"paid"}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:11:01.536Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=486671765\u0026pid=uid4009-26060253-59","category":5,"createdAt":"2016-03-14T13:41:07.487Z","imageURL":"https://resources.shopstyle.com/pim/aa/92/aa9286b799d7640f276657fa5e41ee92_best.jpg","importMarkerTag":6624,"lowercaseName":"mid rise skinny with knee holes in marie vintage blue","objectId":"8o9e8nMF7m","productName":"Mid Rise Skinny With Knee Holes In Marie Vintage Blue","referenceURL":"http://www.shopstyle.com/p/7-for-all-mankind-mid-rise-skinny-with-knee-holes-in-marie-vintage-blue/486671765?pid=uid4009-26060253-59","ssBrandId":3,"ssBrandName":"7 For All Mankind","ssDate":{"__type":"Date","iso":"2014-12-05T00:00:00.000Z"},"ssId":486671765,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/aa/92/aa9286b799d7640f276657fa5e41ee92_best.jpg","updatedAt":"2016-03-14T13:41:07.487Z"},"update":{"importMarkerTag":1556}}
Result: Execution timed out
E2016-03-14T14:10:21.498Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:08:18.638Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=490062821\u0026pid=uid4009-26060253-59","category":2,"createdAt":"2016-03-14T13:40:12.971Z","imageURL":"https://resources.shopstyle.com/pim/20/cb/20cb7387834dd02ac9d950bde0f57b83_best.jpg","importMarkerTag":1556,"lowercaseName":"baggu basic tote in brown","objectId":"I4UTiUMnUG","productName":"Baggu Basic Tote In Brown","referenceURL":"http://www.shopstyle.com/p/baggu-basic-tote-in-brown/490062821?pid=uid4009-26060253-59","ssBrandId":-1,"ssBrandName":"","ssDate":{"__type":"Date","iso":"2014-12-03T00:00:00.000Z"},"ssId":490062821,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/20/cb/20cb7387834dd02ac9d950bde0f57b83_best.jpg","updatedAt":"2016-03-14T14:06:12.708Z"},"update":{"importMarkerTag":1556}}
Result: Uncaught undefined
E2016-03-14T14:08:18.225Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:06:12.824Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=489915836\u0026pid=uid4009-26060253-59","category":2,"createdAt":"2016-03-14T13:40:13.193Z","imageURL":"https://resources.shopstyle.com/pim/14/ef/14ef17ff769227c4293892e770fcf50a_best.jpg","importMarkerTag":1556,"lowercaseName":"basic tote in black","objectId":"JQ7GuRjfgH","productName":"Basic Tote In Black","referenceURL":"http://www.shopstyle.com/p/baggu-basic-tote-in-black/489915836?pid=uid4009-26060253-59","ssBrandId":25820,"ssBrandName":"Baggu","ssDate":{"__type":"Date","iso":"2014-12-02T00:00:00.000Z"},"ssId":489915836,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/14/ef/14ef17ff769227c4293892e770fcf50a_best.jpg","updatedAt":"2016-03-14T14:06:10.013Z"},"update":{"importMarkerTag":1556}}
Result: Execution timed out
E2016-03-14T14:05:23.844Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined

pin_rel issue while loading rated events (Error: Update Stored Procedure: 8003)

I'm getting the following error while loading the .out file using pin_rel
Error 02/28/16 10:46:56:0552 PM ( 1456728416552 ) T:Update SP Thread 1 REL RELUpdaterThread 1:ece:UnknownProgramName:0:Update SP Thread 1:0:1456728416:0
RA-20003: Error -20015error while processing data from event_essentials occurred in the update procedure start_obj_id0 = 1449525761317588038 end_obj_id0 = 1449525761317588038 sqlcode = -20015 sqlerrm = ORA-20015: precommit failed (with exception): 18838741
ORA-06512: at "PIN10.PIN_REL", line 4260
ORA-29532: Java call terminated by uncaught Java exception: DeterminateError - ERR_BAD_OPCODE
FList.java:0: ErrBuf Fields:
Error=ERR_BAD_OPCODE Loc=DM
Field=PIN_FLD_OP_SQL_TRACE Rec=0 reserved=35
Facility=0 MessageID=0 Time=4:00 PM Version=0 Reserved2=0
Args=<none>
Nested Error:
<none>
ORA-06512: at "PIN10.PIN_REL", line 4898
ORA-20015: precommit failed (with exception): 18838741
ORA-06512: at "PIN10.PIN_REL", line 4260
ORA-29532: Java call terminated by uncaught Java exception: DeterminateError - ERR_BAD_OPCODE
FList.java:0: ErrBuf Fields:
Error=ERR_BAD_OPCODE Loc=DM
Field=PIN_FLD_OP_SQL_TRACE Rec=0 reserved=35
Facility=0 MessageID=0 Time=4:00 PM Version=0 Reserved2=0
Error 02/28/16 10:46:56:0571 PM ( 1456728416575 ) T:main REL IREL 1:ece:UnknownProgramName:0:main:1:1456728415:0
Error encountered in the Update Stored Procedure: 8003
The update stored procedure encountered an error on an update statement.
Error 02/28/16 10:46:56:0575 PM ( 1456728416575 ) T:main REL IREL 1:ece:UnknownProgramName:0:main:1:1456728415:0
Exiting with return code: 8
One of the suggestion was to execute below listed .plb files present in pin_rel directory
pin_rel_tt_pre_updater_sp.plb*
pin_rel_updater_sp_oracle.plb*
suspense_updater_sp_oracle.plb*
pin_rel_tt_updater_sp.plb*
But this solution didn't work. Only event related tables are loaded, Item tables aren't populated.
set the ObjectCacheTypeOutputSplit to FALSE in pipeline registery. If this field is set to TRUE it will result in 2 identical output files from a single input EDR and write them to separate output streams.

Angular2 app works in Chrome and IE, but not Firefox or Safari

App works fine in Chrome and IE(11), but not in Firefox (42.0) or Safari (5.1.7).
FIREFOX:
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create es6-shim.js:1338:11
Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode. angular2.dev.js:351:5
EXCEPTION: Error: Expected int32 as second argument angular2.dev.js:23524
BrowserDomAdapter</BrowserDomAdapter.prototype.logError() angular2.dev.js:23514
BrowserDomAdapter</BrowserDomAdapter.prototype.logGroup() angular2.dev.js:23525
ExceptionHandler</ExceptionHandler.prototype.call() angular2.dev.js:1145
PlatformRef_</PlatformRef_.prototype._initApp/</<() angular2.dev.js:14801
NgZone</NgZone.prototype._notifyOnError() angular2.dev.js:5796
NgZone</NgZone.prototype._createInnerZone/errorHandling<.onError() angular2.dev.js:5700
run() angular2-polyfills.js:141
map#http://localhost:53861/lib/es6-shim/es6-shim.js:1113:14
TemplateParseVisitor</TemplateParseVisitor.prototype._createDirectiveAsts#http://localhost:53861/lib/anguar2/angular2.dev.js:24301:27
TemplateParseVisitor</TemplateParseVisitor.prototype.visitElement#http://localhost:53861/lib/anguar2/angular2.dev.js:24154:24
HtmlElementAst</HtmlElementAst.prototype.visit#http://localhost:53861/lib/anguar2/angular2.dev.js:20216:14
htmlVisitAll/<#http://localhost:53861/lib/anguar2/angular2.dev.js:20227:23
forEach#http://localhost:53861/lib/es6-shim/es6-shim.js:1107:14
htmlVisitAll#http://localhost:53861/lib/anguar2/angular2.dev.js:20226:5
TemplateParser</TemplateParser.prototype.parse#http://localhost:53861/lib/anguar2/angular2.dev.js:24038:20
TemplateCompiler</TemplateCompiler.prototype._compileComponentRuntime/done<#http://localhost:53861/lib/anguar2/angular2.dev.js:24669:32
run#http://localhost:53861/lib/anguar2/angular2-polyfills.js:138:14
NgZone</NgZone.prototype._createInnerZone/<.$run/<#[…]
SAFARI:
EXCEPTION: Error during instantiation of BrowserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> DomRenderer -> AnimationBuilder -> BrowserDetails).
angular2.dev.js:23514ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')
Potentially unhandled rejection [2] Error: EXCEPTION: Error during instantiation of BrowserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> DomRenderer -> AnimationBuilder -> BrowserDetails).
ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')
Error loading http://localhost:53861/app/bootDesktop.js
Any ideas as to what is wrong greatly appreciated. It looks like it has something to do with "BrowserDomAdapter".
issue resolved by upgrade the es6-shim.

T4 Template,debugging without error when save an error

Code here!
T4 Template,debugging without error when save an error!!!
The code I can make sure there is no problem,And the debugger is normal, files are generated!
ERROR:
T4MVCGenerateInfo`2[TModel,TDbContext]' violates the constraint of type parameter 'TDbContext'
Error detail:
错误 4 正在运行转换: System.TypeLoadException: “Microsoft.VisualStudio.TextTemplatingEB3B19F9ED2A1CD8FC4B21815C1AACB477DD055C49C5754AF0754E9D44596039EB9CA531F9F56BFB60B31D13311A2A84214359163B64F650FF3E2A2DDF6E869D.GeneratedTextTransformation+T4MVCGenerateInfo`2[TModel,TDbContext]”上的 GenericArguments[1] (“Magicodes.Admin.Models.AdminContext”)与类型参数“TDbContext”的约束冲突。
在 Microsoft.VisualStudio.TextTemplatingEB3B19F9ED2A1CD8FC4B21815C1AACB477DD055C49C5754AF0754E9D44596039EB9CA531F9F56BFB60B31D13311A2A84214359163B64F650FF3E2A2DDF6E869D.GeneratedTextTransformation.TransformText()
在 Microsoft.VisualStudio.TextTemplating.TransformationRunner.PerformTransformation() D:\CloudDriver\Git\Magicodes.NET\Plus\Magicodes.Admin\Controllers\SiteAdminNavigationsController.cs.t4 1 1 Magicodes.Admin

Resources