Sencha build error when viewed in browser - javascript

I have finally managed to create a production build of my sencha web app using Cmd 3.10.2.342 and touch 2.2.1
All my bespoke files are included and deltas are created as one would expect. However, when I run it in the browser, it stalls at the loading view. Console log says:
TypeError: 'undefined' is not a function (evaluating 'h.call(w,w)')
I have traced the error to Ext.application({... in app.js.
I have tried the following changes, but still get errors:
new Ext.application({...
Ext.Application({...
new Ext.Application({...
How can I rectify this?
When I generate an apk file, I do not have this problem
In my production app.js, I found this
if(!s){a.set(i,w);if(h){h.call(w,w)}a.triggerCreated(i);return}
I don't really know what it does. I have tried deleting it etc, but it just the gives other errors instead

I traced this back to issues/conflicts with itemId and id where sencha was telling me that a component already existed and should be destroyed.
Solved it by removing id and itemId and used cls instead

Related

Cannot read property 'lists' of undefined

I am trying to create a web application that mimics trello. I keep getting this error and im not sure how to fix it. The code works fine in another project but not when i try and add it to this new project. ALL dependencies are updated. I am running it on google chrome. I read it might be a problem with chrome?
This is the error that I am receiving on my browser. There are no errors in my IDE.
This is the code that is producing this error. The code works fine in another IDE but once I try to integrate the component into my new app it crashes.
Make sure you are getting array in list key in "board" Props and try to use optional Channing
{
boar?.list?.map(..)
}
Your board props is undefined that's why you're getting this error.

react native app crash without log in debug mode

i'm using the last version of react and react-native :
"react": "16.1.1",
"react-native": "^0.50.3"
Some times my app's crash completely and close without any log in chrome and i don't get the red screen on the phone, i'm in debug mode of course and get usual error or log in chrome console.
For example with this view, i render the same data. The render 1 work well and don't crash the app. the render 2 work for fews lines thans the app crash
I get the app crash without any log for other kind of bug too ( missing parameter in props for example ).
Any way to track or solve this ? i don't found local tools for that
I finaly solve this by using adb logcat, working for android
adb logcat com.yourAppName:D *:W
yourAppName is the one you used in package.json under name field

express-stormpath not recognizing environment variables to initialize on Heroku

i have a simple web server, trying to use the npm-package 'express-stormpath' for basic user registration.
everything works fine locally - but consistently getting this error when i deploy to Heroku:
Error: apiKey.id is required.
2015-10-23T00:23:52.603692+00:00 app[web.1]: at new RequestExecutor (/app/node_modules/express-stormpath/node_modules/stormpath/lib/ds/RequestExecutor.js:26:37)
i have tried every possible way i can find on the internet to configure this:
1) entirely environment vars, as laid out in https://docs.stormpath.com/nodejs/express/latest/configuration.html#environment-variables
2) a small, private config file in ./stormfront as laid out here :
'apiKey.id is required' error thrown when using express-stormpath with node.js
3) i've tried the following method, manually creating the apiKey object:
https://github.com/stormpath/express-stormpath/issues/135
and nothing works on heroku. any tips?
We have a momentary bug in our Node SDK, please modify your configuration variables to use these new names:
STORMPATH_CLIENT_APIKEY_ID
STORMPATH_CLIENT_APIKEY_SECRET
STORMPATH_APPLICATION_HREF
We made a new release that accepts these new paramaters, but unfortunately it broke backwards compatibility with the old ones. We will relase a fix tomorrow, but you can fix the problem now by using the variables names. Our apologies for this problem!

Meteor: disable hot code push

I'm developing a phonegap app and hot code push is causing a problem for some of my users (after push, app hangs and users have to re-install the new app).
I'd like to disable hot code pushes and found the following snippet but am getting the error, "TypeError: Cannot call method 'onMigrate' of undefined"
Meteor._reload.onMigrate(function() {
return [false];
});
Looks like the _reload object is only available on the client. I moved the snippet of code to a client directory and that solved it.
Leaving this question / answer here for anyone else who might come across it.
You can set the environment variable AUTOUPDATE_VERSION to something static. You need to set this environment variable when you build your app and when you start the server. (Source)

Sencha Compile issue while deploying web application using ./make_bootstrap.sh; ./make_compile.sh

Hi I am working on a web application that is implemented in Ext-JS. I deployed the application using Sencha Cmd v3.0.0.250 with command ./make_bootstrap.sh; ./make_compile.sh
No issues during the deployment.
The application can be accessed using the test link //mainApplication/app/index_debug.html or //mainApplication/app (accesses all-classes.js) url....
When the app is deployed it compresses all javaScript files into one file which is all-classes.js. The deployment was successful. But when I access the app from the url ://mainApplication/app/... it shows the following error:
Uncaught TypeError: Cannot read property 'dom' of null all-classes.js:1
Ext.define.initContainerall-classes.js:1
Ext.define.renderall-classes.js:1
Ext.define.doAutoRenderall-classes.js:1
Ext.define.showall-classes.js:1
(anonymous function)all-classes.js:1
TableManager::findTables() content.scripts.c.js:11
However if I access the app using ://myApplication/app/index_debug.html, it works fine. This is for testing purpose and it loads all js files individually unlike accessing through all-classes.js
I have browsed through the web for similar error. But haven't found any at this level. If the application is accessible through index_debug.html why would it not be accessible with the same javaScript files but compressed?
The compressed all-classes.js obviously removes all whitespace and hence it is just a one line code when formatting (using Sublime Text's JSFormatter package) becomes thousands of lines. Since it was one line I couldn't find what the browser is complaining about. I formatted the code and ran the application. And found exactly in which line it failed. It was pointing to an anonymous function. Once I remove the function the app started working... So the tip here is to format the compressed code when debugging in firebug or chrome developer tool.

Categories

Resources