Production build cannot find view - sencha-touch-2

I am using Sencha Touch version 2.1.1 and CMD version 3.0.2.288.
I am converting a working 2.0 application to 2.1.
When I build the application and run it, I get errors indicating that views cannot be loaded. When I look in the build folder at the path indicated by the error, the views are not there.
Here is the error:
http://localhost:8888/Mobile/build/a...24263186Failed to load resource: the server responded with a status of 404 (Not Found)
The application runs perfectly in Safari prior to building. Does anyone have any ideas?
Output from the compilation is below
Sencha Cmd v3.0.2.288
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] -before-app-build:
[INF]
[INF] app-build-impl:
[INF]
[INF] production:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] find-cmd:
[INF]
[INF] -before-init:
[INF]
[INF] -init:
[INF]
[INF] -after-init:
[INF]
[INF] init:
[INF]
[INF] -before-build:
[INF]
[INF] sass:
[INF]
[INF] page:
[INF]
[INF] -before-page:
[INF]
[INF] -page:
[INF] building application
[INF] Deploying your application to /Applications/MAMP/htdocs/Mobile/build/app/production
[INF] Copied /Applications/MAMP/htdocs/Mobile/./app.js to /Applications/MAMP/htdocs/Mobile/build/app/production/app.js
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/css/app.css to /Applications/MAMP/htdocs/Mobile/build/app/production/resources/css/app.css
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/images
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/icons
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/loading
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/data
[INF] Resolving your application dependencies (file:////Applications/MAMP/htdocs/Mobile/./index.html)
[INF] Compiling app.js and dependencies
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/sencha-compile-temp-dir
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/touch/src
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/app.js
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/app
[INF] Processing class inheritance graph
[INF] Processing instantiation refereces to classes and aliases
[INF] Processing source dependencies
[INF] Concatenating output to file /Applications/MAMP/htdocs/Mobile/build/app/production/app.js
[INF] Completed compilation.
[INF] Processed remote file touch/sencha-touch.js
[INF] Processed local file app.js
[INF] Minified app.js
[INF] Generated delta for: app.js from hash: '0cf2d66c793df3275db06ce3c88737d55b92c0ac' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '3defd723a308dffa24d79abe9b36efaea9b7fa2c' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '68b15cd8c4470cae367618d56d2221f750fe94c5' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '7abfe02aa5647b33770d8584330c838c7228e6a3' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '955de9ce50a676d272e4b81984164be49b347f01' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'bb51ed6de771efa962e01e67807e488d760b63a0' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'ce841c66ba0f08125ef8a850960c4b0366ef061f' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'd09ff9bd2f3c719c21fe44c3a7d6a2f3690bc816' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'fbb192007fd273dd08359e426311be7688656b2a' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Minified resources/css/app.css
[INF] Generated app.json
[INF] Embedded microloader into index.html
[INF] Generating appcache
[INF] Generating checksum for appCache item: index.html
[INF] Generating checksum for appCache item: resources/css/app.css
[INF] Generating checksum for appCache item: resources/data/data.json
[INF] Generating checksum for appCache item: resources/images/Billing.png
[INF] Generating checksum for appCache item: resources/images/Billing#2x.png
[INF] Generating checksum for appCache item: resources/images/Biochem.png
[INF] Generating checksum for appCache item: resources/images/Biochem#2x.png
[INF] Generating checksum for appCache item: resources/images/Contact.png
[INF] Generating checksum for appCache item: resources/images/Contact#2x.png
[INF] Generating checksum for appCache item: resources/images/Cyto.png
[INF] Generating checksum for appCache item: resources/images/Cyto#2x.png
[INF] Generating checksum for appCache item: resources/images/Disclosure.png
[INF] Generating checksum for appCache item: resources/images/Disclosure#2x.png
[INF] Generating checksum for appCache item: resources/images/FAQ.png
[INF] Generating checksum for appCache item: resources/images/FAQ#2x.png
[INF] Generating checksum for appCache item: resources/images/Feedback.png
[INF] Generating checksum for appCache item: resources/images/Feedback#2x.png
[INF] Generating checksum for appCache item: resources/images/IntegratedTesting.png
[INF] Generating checksum for appCache item: resources/images/IntegratedTesting#2x.png
[INF] Generating checksum for appCache item: resources/images/Molecular.png
[INF] Generating checksum for appCache item: resources/images/Molecular#2x.png
[INF] Generating checksum for appCache item: resources/images/S.png
[INF] Generating checksum for appCache item: resources/images/S#2x.png
[INF] Generating checksum for appCache item: resources/images/TestMenu.png
[INF] Generating checksum for appCache item: resources/images/TestMenu#2x.png
[INF] Generating checksum for appCache item: resources/loading/Default-LandscapeLeft~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-LandscapeRight~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-Landscape~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-PortraitUpsideDown~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-Portrait~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default.png
[INF] Generating checksum for appCache item: resources/loading/Default#2x.png
[INF] Generating checksum for appCache item: resources/loading/Default~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Homescreen.jpg
[INF] Generating checksum for appCache item: resources/loading/Homescreen~ipad.jpg
[INF] Successfully deployed your application to /Applications/MAMP/htdocs/Mobile/build/app/production
[INF]
[INF] -after-page:
[INF]
[INF] run:
[INF]
[INF] -build:
[INF]
[INF] -after-build:
[INF]
[INF] build:
[INF]
[INF] -after-app-build:
[INF]
[INF] app-build:
Here is my app.json:
{
/**
* The application's namespace, used by Sencha Command to generate classes
*/
"name": "App",
/**
* List of all JavaScript assets in the right execution order.
* Each item is an object with the following format:
* {
* "path": "path/to/script.js" // Relative path to this app.json file
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed.
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"js": [
{
"path": "touch/sencha-touch.js"
},
{
"path": "app.js",
"update": "delta"
}
],
/**
* List of all CSS assets in the right inclusion order.
* Each item is an object with the following format:
* {
* "path": "path/to/item.css" // Relative path to this app.json file
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed to either one below
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"css": [
{
"path": "resources/css/app.css",
"update": "delta"
}
],
/**
* Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
*/
"appCache": {
/**
* List of items in the CACHE MANIFEST section
*/
"cache": [
"index.html",
"resources/css/app.css",
"resources/data/data.json",
"resources/images/Billing.png",
"resources/images/Billing#2x.png",
"resources/images/Biochem.png",
"resources/images/Biochem#2x.png",
"resources/images/Contact.png",
"resources/images/Contact#2x.png",
"resources/images/Cyto.png",
"resources/images/Cyto#2x.png",
"resources/images/Disclosure.png",
"resources/images/Disclosure#2x.png",
"resources/images/FAQ.png",
"resources/images/FAQ#2x.png",
"resources/images/Feedback.png",
"resources/images/Feedback#2x.png",
"resources/images/IntegratedTesting.png",
"resources/images/IntegratedTesting#2x.png",
"resources/images/Molecular.png",
"resources/images/Molecular#2x.png",
"resources/images/S.png",
"resources/images/S#2x.png",
"resources/images/TestMenu.png",
"resources/images/TestMenu#2x.png",
"resources/loading/Default-LandscapeLeft~ipad.png",
"resources/loading/Default-LandscapeRight~ipad.png",
"resources/loading/Default-Landscape~ipad.png",
"resources/loading/Default-PortraitUpsideDown~ipad.png",
"resources/loading/Default-Portrait~ipad.png",
"resources/loading/Default.png",
"resources/loading/Default#2x.png",
"resources/loading/Default~ipad.png",
"resources/loading/Homescreen.jpg",
"resources/loading/Homescreen~ipad.jpg"
//"touch/sencha-touch.js",
],
/**
* List of items in the NETWORK section
*/
"network": [
"*"
],
/**
* List of items in the FALLBACK section
*/
"fallback": []
},
/**
* Extra resources to be copied along when build
*/
"extras": [
"resources/images",
"resources/icons",
"resources/loading",
"resources/data"
],
/**
* Directory path to store all previous production builds. Note that the content generated inside this directory
* must be kept intact for proper generation of delta between updates
*/
"archivePath": "archive",
/**
* Default paths to build this application to for each environment
*/
"buildPaths": {
"testing": "build/testing",
"production": "build/production",
"package": "build/package",
"native": "build/native"
},
/**
* Build options
*/
"buildOptions": {
"product": "touch",
"minVersion": 3,
"debug": false,
"logger": "no"
},
/**
* Uniquely generated id for this application, used as prefix for localStorage keys.
* Normally you should never change this value.
*/
"id": "996b4be0-9f88-11e1-b590-67deda5f4cdb"
}
Here is the app.js
Ext.Loader.setPath({
'Ext': 'touch/src'
});
Ext.application({
name: 'App',
requires: [
'Ext.MessageBox'
],
views: [
'Main',
'Homepage',
'Sections',
'Detail',
'RequisitionRequest'
],
models: [
'Sections'
],
stores: [
'Sections'
],
controllers: [
'Main'
],
icon: {
57: 'resources/icons/Icon.png',
72: 'resources/icons/Icon~ipad.png',
114: 'resources/icons/Icon#2x.png',
144: 'resources/icons/Icon~ipad#2x.png'
},
phoneStartupScreen: 'resources/loading/Homescreen.jpg',
tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg',
launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Initialize the main view
Ext.Viewport.add(Ext.create('App.view.Main'));
// Initialize the requisition request view
//Ext.Viewport.add(Ext.create('App.view.RequisitionRequest'));
},
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function(buttonId) {
if (buttonId === 'yes') {
window.location.reload();
}
}
);
}
});

Problem solved! The following snippet was at the bottom of my Main.js view adn I completely missed it. After I removed it the application runs properly after building.
/**
* Fix for Bug TOUCH-2665 (Sencha Touch 2.0.1 RC)
* must be removed in next release
*/
Ext.define('App.Tabfix', {
override: 'Ext.tab.Panel',
doTabChange: function(tabBar, newTab) {
this.setActiveItem(tabBar.indexOf(newTab));
}
});

Related

How to enable swagger UI on micronaut?

I'm following the micronaut doc for openapi at https://micronaut-projects.github.io/micronaut-openapi/latest/guide/
and the UI is not being generated, every time when I try to access /swagger, /swagger-ui I got this error:
{
"message": "Not Found",
"_links": {
"self": {
"href": "/swagger",
"templated": false
}
},
"_embedded": {
"errors": [
{
"message": "Page Not Found"
}
]
}
}
The dependencies are installed:
implementation("io.swagger.core.v3:swagger-annotations")
annotationProcessor("io.micronaut.openapi:micronaut-openapi:4.5.2")
The router on application.yml is defined:
micronaut:
application:
name: myapp
router:
static-resources:
default:
enabled: true
swagger:
enabled: true
paths: classpath:META-INF/swagger
mapping: /swagger/**
and the file openapi.properties on the root folder is created:
swagger-ui.enabled=true
micronaut.openapi.views.spec=apidoc.enabled=true,swagger-ui.enabled=true,swagger-ui.theme=flattop
micronaut.openapi.expand.api.version=v0.1
micronaut.openapi.expand.openapi.description=myapp
according to the docs a .yml file should be generated at;
For Kotlin build/tmp/kapt3/classes/main/META-INF/swagger/myapp-0.1.yml
On my controllers I have the Operation and ApiResponses annotation as well, but when I run the application the file yml is not being generated, how can I properly enable swagger on my micronaut project?
Code sample: https://github.com/rafa-acioly/micronaut
You defined only swagger in your application.yml. You should add also add a section for swagger-ui with a similar definition:
micronaut:
application:
name: openapitest
router:
static-resources:
swagger:
paths: classpath:META-INF/swagger
mapping: /swagger/**
swagger-ui:
paths: classpath:META-INF/swagger/views/swagger-ui
mapping: /swagger-ui/**
Also, I used the default openapi.properties file:
swagger-ui.enabled=true
redoc.enabled=false
rapidoc.enabled=false
rapidoc.bg-color=#14191f
rapidoc.text-color=#aec2e0
rapidoc.sort-endpoints-by=method
And did you try to clean and build your project with gradlew?
I create a sample repository on GitHub and you can check it.
=========UPDATE========
Ok, I've found what is incorrect! You are using annotation-processing :
annotationProcessor("io.micronaut.openapi:micronaut-openapi:4.5.2")
But if you are using Kotlin, you should use kapt - Kotlin Annotation Processing Tool. Here is a few articles - link1, link2.
So you should change to:
kapt("io.micronaut.openapi:micronaut-openapi:4.5.2")

Iot Hub module "Modbus" looks healthy and well parametrized but no data received

I am connecting a "Janitza UMG96RM-E" device to a Windows Laptop where I am using Hyper-V to use Linux cmds. I registered the Laptop as an Edge device and added Modbus to the set of modules. I read the Janitza documentation (start Address, nbre of bits ...) and I Added the correct Ip Address the Module Twins file... Everything looks heathy except I am not receiving any data from the Modbus module... I am not able to figure out what is wrong ? Here is some logs from edgeHub module.
<6> 2022-03-08 18:32:01.503 +00:00 [INF] - Add node: myEdgeDevice/DefenderIotMicroAgent
<6> 2022-03-08 18:32:01.711 +00:00 [INF] - Add node: myEdgeDevice/Modbus
<6> 2022-03-08 18:32:01.868 +00:00 [INF] - Done refreshing device scope identities cache. Waiting for 60 minutes.
<6> 2022-03-08 18:32:01.956 +00:00 [INF] - Obtained edge hub config from module twin
<6> 2022-03-08 18:32:02.377 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2022-03-08 18:32:02.377 +00:00 [INF] - modbusToIoTHub: FROM /messages/modules/Modbus/outputs/modbusOutput INTO $upstream
<6> 2022-03-08 18:32:02.378 +00:00 [INF] - Updated message store TTL to 7200 seconds
<6> 2022-03-08 18:32:02.379 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2022-03-08 18:32:02.391 +00:00 [INF] - Started operation Get EdgeHub config
<6> 2022-03-08 18:32:02.395 +00:00 [INF] - Initialized edge hub configuration
<6> 2022-03-08 18:32:02.397 +00:00 [INF] - Starting protocol heads - (MQTT, AMQP, HTTP)
<6> 2022-03-08 18:32:02.410 +00:00 [INF] - Starting MQTT head
<6> 2022-03-08 18:32:02.524 +00:00 [INF] - Initializing TLS endpoint on port 8883 for MQTT head.
<6> 2022-03-08 18:32:02.845 +00:00 [INF] - Starting AMQP head
<6> 2022-03-08 18:32:02.873 +00:00 [INF] - Started MQTT head
<6> 2022-03-08 18:32:03.251 +00:00 [INF] - Started AMQP head
<6> 2022-03-08 18:32:03.255 +00:00 [INF] - Starting HTTP head
<4> 2022-03-08 18:32:04.026 +00:00 [WRN] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead.
<6> 2022-03-08 18:32:04.063 +00:00 [INF] - Started HTTP head
<6> 2022-03-08 18:32:05.529 +00:00 [INF] - New token received on the Cbs link
<6> 2022-03-08 18:32:05.727 +00:00 [INF] - Client myEdgeDevice/Modbus in device scope authenticated locally.
<6> 2022-03-08 18:32:05.745 +00:00 [INF] - New device connection for device myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.746 +00:00 [INF] - Client myEdgeDevice/Modbus connected to edgeHub, processing existing subscriptions.
<6> 2022-03-08 18:32:05.750 +00:00 [INF] - Attempting to connect to IoT Hub for client myEdgeDevice/Modbus via AMQP...
<6> 2022-03-08 18:32:05.767 +00:00 [INF] - Bind device proxy for device myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.767 +00:00 [INF] - Initialized device listener in the AMQP protocol head for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.786 +00:00 [INF] - Opened link Events for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Cloud connection for myEdgeDevice/Modbus is True
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Connection status for myEdgeDevice/Modbus changed to ConnectionEstablished
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Client myEdgeDevice/Modbus connected to cloud, processing existing subscriptions.
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Skipping myEdgeDevice/Modbus for subscription processing, as it is currently being processed.
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Created cloud proxy for client myEdgeDevice/Modbus via AMQP, with client operation timeout 20 seconds.
<6> 2022-03-08 18:32:05.828 +00:00 [INF] - Initialized cloud proxy 9450b673-5293-4c0b-830f-5c564f317321 for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.828 +00:00 [INF] - Created cloud connection for client myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.116 +00:00 [INF] - Opened link TwinReceiving for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.126 +00:00 [INF] - Processing pending subscriptions for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.129 +00:00 [INF] - Opened link TwinSending for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.659 +00:00 [INF] - Processing pending subscriptions for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.661 +00:00 [INF] - Opened link ModuleMessages for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.760 +00:00 [INF] - Updated reported properties for myEdgeDevice/$edgeHub
<6> 2022-03-08 18:32:12.133 +00:00 [INF] - Updated reported properties for myEdgeDevice/Modbus
<6> 2022-03-08 18:36:56.469 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:41:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:46:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:51:56.464 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:56:56.464 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:01:53.016 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2022-03-08 19:01:53.083 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2022-03-08 19:01:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:06:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:11:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:16:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:21:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:26:56.464 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:30:05.794 +00:00 [INF] - New token received on the Cbs link
<6> 2022-03-08 19:30:05.800 +00:00 [INF] - Token updated for myEdgeDevice/Modbus
<6> 2022-03-08 19:30:57.126 +00:00 [INF] - Request starting HTTP/1.1 GET http://172.18.0.3:9600/metrics
<6> 2022-03-08 19:30:57.203 +00:00 [INF] - Request finished in 76.276ms 200 text/plain; version=0.0.4; charset=utf-8
<6> 2022-03-08 19:31:53.089 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2022-03-08 19:31:53.157 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2022-03-08 19:31:56.459 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:32:01.877 +00:00 [INF] - Starting refresh of device scope identities cache
<6> 2022-03-08 19:32:02.390 +00:00 [INF] - Starting periodic operation Get EdgeHub config...
<6> 2022-03-08 19:32:02.781 +00:00 [INF] - Obtained edge hub config from module twin
<6> 2022-03-08 19:32:02.939 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2022-03-08 19:32:02.940 +00:00 [INF] - modbusToIoTHub: FROM /messages/modules/Modbus/outputs/modbusOutput INTO $upstream
<6> 2022-03-08 19:32:02.941 +00:00 [INF] - Updated message store TTL to 7200 seconds
<6> 2022-03-08 19:32:02.941 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2022-03-08 19:32:02.941 +00:00 [INF] - Successfully completed periodic operation Get EdgeHub config
<6> 2022-03-08 19:32:03.056 +00:00 [INF] - Updated reported properties for myEdgeDevice/$edgeHub
<6> 2022-03-08 19:32:04.404 +00:00 [INF] - Not changed node: myEdgeDevice
<6> 2022-03-08 19:32:04.405 +00:00 [INF] - Not changed node: myEdgeDevice/$edgeAgent
<6> 2022-03-08 19:32:04.405 +00:00 [INF] - Not changed node: myEdgeDevice/$edgeHub
<6> 2022-03-08 19:32:04.405 +00:00 [INF] - Not changed node: myEdgeDevice/DefenderIotMicroAgent
<6> 2022-03-08 19:32:04.406 +00:00 [INF] - Not changed node: myEdgeDevice/Modbus
<6> 2022-03-08 19:32:04.406 +00:00 [INF] - Done refreshing device scope identities cache. Waiting for 60 minutes.
<6> 2022-03-08 19:36:56.459 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:41:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:46:56.462 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:51:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:56:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:01:53.157 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2022-03-08 20:01:53.159 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2022-03-08 20:01:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:06:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:11:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:16:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:21:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
Modbus Module Twin:
{
"deviceId": "myEdgeDevice",
"moduleId": "Modbus",
"etag": "AAAAAAAAAA4=",
"deviceEtag": "Mzc5OTQzNzE5",
"status": "enabled",
"statusUpdateTime": "0001-01-01T00:00:00Z",
"connectionState": "Connected",
"lastActivityTime": "0001-01-01T00:00:00Z",
"cloudToDeviceMessageCount": 0,
"authenticationType": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
},
"modelId": "",
"version": 33,
"properties": {
"desired": {
"PublishInterval": 2000,
"SlaveConfigs": {
"Slave01": {
"SlaveConnection": "192.168.151.50",
"HwId": "HwId1",
"Operations": {
"Op01": {
"PollingInterval": "100",
"UnitId": "1",
"StartAddress": "19000",
"Count": "32",
"DisplayName": "Voltage",
"CorrelationId": "MessageType1"
}
},
"TcpPort": "502",
"RetryCount": "10",
"RetryInterval": "100"
}
},
"routes": {
"modbusToIoTHub": "FROM /messages/modules/Modbus/outputs/modbusOutput INTO $upstream"
},
"$metadata": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"PublishInterval": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"SlaveConfigs": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"Slave01": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"SlaveConnection": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"HwId": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"Operations": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"Op01": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"PollingInterval": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"UnitId": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"StartAddress": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"Count": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"DisplayName": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"CorrelationId": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
}
}
},
"TcpPort": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"RetryCount": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"RetryInterval": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
}
}
},
"routes": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"modbusToIoTHub": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
}
}
},
"$version": 14
},
"reported": {
"PublishInterval": 2000,
"SlaveConfigs": {
"Slave01": {
"Operations": {
"Op01": {
"PollingInterval": 100,
"UnitId": 1,
"StartAddress": "19000",
"Count": 32,
"DisplayName": "Voltage",
"CorrelationId": "MessageType1"
}
},
"SlaveConnection": "192.168.151.50",
"RetryCount": 10,
"RetryInterval": 100,
"TcpPort": 502,
"HwId": "HwId1"
}
},
"$metadata": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"PublishInterval": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"SlaveConfigs": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"Slave01": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"Operations": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"Op01": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"PollingInterval": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"UnitId": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"StartAddress": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"Count": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"DisplayName": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"CorrelationId": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
}
}
},
"SlaveConnection": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"RetryCount": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"RetryInterval": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"TcpPort": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"HwId": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
}
}
}
},
"$version": 19
}
}
}
Here are the info that I used from the Janitza docs to configure the Module Twin:
Modbus address list
I have found that the problem was the register start-address that I am reading from.
In my case I had the add a 4 in the beginning (Holding Register) and +1 in the end.
example: if in the documentation of the slave device I can read the Power from the address 19000 : in the Modbus Module twin I specify the address to be 419001 !
I hope this can help people in the future.
Have you checked the logs of the module? Check the name of the module with iotedge list.
sudo iotedge list
sudo iotedge logs Modbus
You need to specify a route from the modbus module to the $upstream channel of edgeHub to have the data routed to Azure IoT Hub that matches the name of the module from the deployment manifest. It looks correct, but doublechek won't hurt.
To see the data going through the IoT Hub, you can use the Azure IoT explorer.

Testing React Apps with Phantom/Casper

I'm diving into functional testing and attempting to get a few simple tasks working. The app is built in ReactJS and I've decided to use Phantom/Casper. The problem is that even the most basic tasks fail.
In short, is there a trick for testing React apps with Phantom/Casper?
I've installed Phantom (v.2.1.1) and Casper (v1.1.0-beta5). As a first attempt I created a simple script to capture an image:
capture.js
var casper = require('casper').create({
viewportSize: {
width: 1024,
height: 768
},
verbose: true,
logLevel: "debug"
});
casper.start('http://localhost:9494', function() {
console.log("page loaded");
});
casper.then(function() {
this.capture('img.png');
});
});
casper.run();
Then run the script:
> casperjs capture.js
Viewing localhost:9494 in my browser pulls up the app as it should. But the resulting capture() image is a blank screen.
I've also tried adding a wait(), waitForSelector() and waitForResource() to no avail.
Here's the output in the console:
[info] [phantom] Starting...
[info] [phantom] Running suite: 2 steps
[debug] [phantom] opening url: http://localhost:9494/, HTTP GET
[debug] [phantom] Navigation requested: url=http://localhost:9494/, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "http://localhost:9494/"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step anonymous 2/2 http://localhost:9494/ (HTTP 200) page loaded
[debug] [phantom] Capturing page to /path/to/img.png
[info] [phantom] Capture saved to /path/to/img.png
[info] [phantom] Step anonymous 2/2: done in 848ms.
[info] [phantom] Done 2 steps in 848ms
[debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "about:blank"
You need to add the babel-polyfill NPM package to your project (or any other version of the polyfill) and then in your main index.js(x) entry point for your app, include this line at the top:
import 'babel-polyfill';
We were having the exact same issue you are experiencing and this fixed it for us.
We had tried injecting the babel polyfill as part of the Casper test suite, but it was not working.
Not sure how you did the waiting. Make sure your capture is in the wait callback. I usually use code like this and it often happens that you need to adjust the waiting time to see results.
3 seconds is usually enough to crawl public websites, that's how I use it.
casper.then(function() {
this.wait(3000, function() {
this.capture('foo.jpg', undefined,
{
format: 'jpg',
quality: 75
});
});
});

Application Installer abnormal process termination. Process exit value was 1

at the time of running titanium application i am getting error, i have tried all the solutions suggested by google, but problem still remains, please help if anyone can understand the error log i pasted below. Thanks.
Appcelerator Command-Line Interface, version 4.1.2
Copyright (c) 2014-2015, Appcelerator, Inc. All Rights Reserved.
TRACE | __command__ search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
DEBUG | [PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
DEBUG | [PLUGIN-LOAD] 623ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
DEBUG | [PLUGIN-LOAD] 2ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
log level set to "trace"
executing command "run"
set environment to {"registry":"https://software.appcelerator.com","security":"https://security.appcelerator.com","baseurl":"https://platform.appcelerator.com"}
checking credentials for existing session
Attempting to load session info from config file
check if session is invalidated
session expiry 1439531789135 false
+---------------------------------------------------------------------------------------+
+ This is a Developer trial account. You may use this software for evaluation purposes. +
+ Once you are ready to go to production, upgrade at https://billing.appcelerator.com +
+---------------------------------------------------------------------------------------+
Arrow Cloud config file: C:\Users\acer\.acs
found Arrow Cloud login { mid: 'dfa5b79881cc650462ff93ae5df5f65d5760e1cd',
publishPort: 443,
publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
username: 'mymail',
cookie: [ 'connect.sid=s%3Ab9eP%2F3NylwuSkAqEtFC3La1k.RDNuz84uHznd9QjZUQ9Rm6UxHfan0GZcGKug2GtaQjg; Path=/; Expires=Fri, 14 Aug 2015 05:56:35 GMT; HttpOnly' ],
defaultEP:
{ publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com
Arrow Cloud cookie expiry [ 1439531795000 ]
session already loaded in opts.session
getCredentials() session:
{
"ipaddress": "192.168.1.13",
"username": "mymail",
"password": "<OMITTED>",
"session": "<OMITTED>",
"nonce": "<OMITTED>",
"environment": {
"name": "production",
"isProduction": true,
"acsBaseUrl": "https://api.cloud.appcelerator.com",
"acsAuthBaseUrl": "https://secure-identity.cloud.appcelerator.com",
"nodeACSEndpoint": "https://admin.cloudapp-enterprise.appcelerator.com"
},
"token": "<OMITTED>",
"fingerprint": "dfa5b79881cc650462ff93ae5df5f65d5760e1cd",
"fingerprint_description": "Windows Machine ID: bcd68e35-cc53-4567-ab68-66246b73cc67",
"org_id": 100057656,
"expiry": 1439531789135
}
loading plugins for command "run"
run search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
[PLUGIN-LOAD] 251ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow
plugin "arrow" failed its "when" function check, skipping...
loading plugin "titanium" for command "run" CLI options via function
loading plugin "titanium" for command "run" CLI options via array
Duplicate option "colors" for command "run", removing...
executing command "run" with the following plugins:
["titanium"]
TRACE | Attempting to load session info from config file
TRACE | check if session is invalidated
TRACE | session expiry 1439531789135 false
TRACE | session already loaded in opts.session
DEBUG | Titanium Downloads Last Checked: 1439447168501
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" config -o json-object
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" sdk -o json
TRACE | checking for titanium, result:
{ activeSDK: '4.1.0.GA',
defaultInstallLocation: 'C:\\ProgramData\\Titanium',
installLocations:
[ 'C:\\ProgramData\\Titanium',
'C:\\Users\\acer\\AppData\\Roaming\\Titanium',
'C:\\ProgramData\\Application Data\\Titanium' ],
installed: { '4.1.0.GA': 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\4.1.0.GA' } }
TRACE | C:\Program Files\nodejs\node.exe [ 'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules\\appc-cli-titanium\\node_modules\\titanium\\bin\\titanium',
'build',
'--platform',
'android',
'--log-level',
'trace',
'--sdk',
'4.1.0.GA',
'--project-dir',
'D:\\Titanium WS\\ex',
'--target',
'emulator',
'--android-sdk',
'C:\\android-sdk-win',
'--device-id',
'Appp',
'--skip-js-minify',
'--no-colors',
'--no-progress-bars',
'--no-prompt',
'--prompt-type',
'socket-bundle',
'--prompt-port',
'62727',
'--plugin-paths',
'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules',
'--config-file',
'C:\\Users\\acer\\AppData\\Local\\Temp\\build-1439448105417.json',
'--no-banner' ]
[WARN] :
TRACE | titanium exited with exit code 1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
After 24 hours i get my project installing on my device. i am unable to get the exact problem but i want to share my tried steps to solve the problem.
I installed all sdk's one by one.
I switched my current work space and created new one. (old work space still gives error)
Now my project is installing fine, every time.
Thanks.

Casper JS : Strange error: status=fail (HTTP 200)

I'm trying to load the following webpage with casperjs/phantomjs http://m.10bet.com/#leage_panel#10096.
Therefore I wrote the following simple casper script:
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
if( casper.cli.args.length != 1 )
casper.echo('No URL as arguments given. Exiting.\n').exit();
var id = casper.cli.args[0]
casper.start( 'http://m.10bet.com/#leage_panel#' + id, function() {
casper.waitForResource("http://m.10bet.com/pagemethods.aspx/UpdateEvents", function() {
this.echo(casper.getPageContent())
}, function(){}, function(){}, 10000 );
});
casper.run(function() {
this.echo('Done.').exit();
});
So, I'm waiting for the last resource to be loaded which is in this case "http://m.10bet.com/pagemethods.aspx/UpdateEvents". I checked this with the chrome developer tools. Subsequently I want to output the rendered html on the console.
However, but instead of the html I get a in my opinion very strange error:
solaris:js_loaders Tom$ casperjs 10bet_loader.js 10096
2014-01-03 17:31:36.545 phantomjs[8733:130b] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
[info] [phantom] Starting...
[info] [phantom] Running suite: 2 steps
[debug] [phantom] opening url: http://m.10bet.com/#leage_panel#10096, HTTP GET
[debug] [phantom] Navigation requested: url=http://m.10bet.com/#leage_panel#10096, type=Other, lock=true, isMainFrame=true
[debug] [phantom] url changed to "http://m.10bet.com/#leage_panel#10096"
[debug] [phantom] Navigation requested: url=http://m.10bet.com/#leage_panel#10096, type=Reload, lock=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail (HTTP 200): http://m.10bet.com/#leage_panel#10096
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] url changed to "http://m.10bet.com/#leage_panel#10096"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 2/2 http://m.10bet.com/#leage_panel#10096 (HTTP 200)
[info] [phantom] Step 2/2: done in 761ms.
[info] [phantom] Step 3/3 http://m.10bet.com/#leage_panel#10096 (HTTP 200)
[info] [phantom] Step 3/3: done in 771ms.
[warning] [phantom] Casper.waitFor() timeout
[info] [phantom] Done 3 steps in 790ms
Done.
solaris:js_loaders Tom$
As you can see from the log the error "Loading resource failed with status=fail (HTTP 200): http://m.10bet.com/#leage_panel#10096" gives a http 200 ok but failed. Eventually the webpage is not loaded or printed on the console. So I'm wondering what is going wrong here?
Usage:
casperjs stackoverflow.js --idEvent=10096
Code:
var casper = require('casper').create ({
waitTimeout: 15000,
stepTimeout: 15000,
verbose: true,
viewportSize: {
width: 1024,
height: 768
},
pageSettings: {
"userAgent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.10 (KHTML, like Gecko) Chrome/23.0.1262.0 Safari/537.10',
"loadImages": false,
"loadPlugins": false,
"webSecurityEnabled": false,
"ignoreSslErrors": true
},
onWaitTimeout: function() {
casper.echo('Wait TimeOut Occured');
},
onStepTimeout: function() {
casper.echo('Step TimeOut Occured');
}
});
//vars
var idEvent = casper.cli.get('idEvent');
// start
casper.start();
// check args
casper.then(function() {
if (!idEvent) {
//usage check
this.echo('Invalid usage: Must supply Event Id');
casper.exit();
}
});
casper.thenOpen('http://m.10bet.com/#leage_panel#' + idEvent, function() {
casper.waitForResource('http://m.10bet.com/pagemethods.aspx/UpdateEvents', function() {
//casper.waitForSelector('#league_block', function() {
}, function then() { //selector found
this.echo(casper.getPageContent());
casper.exit();
}, function timeout() { //selector not found
this.echo("Timeout On Selector...Exiting").exit();
});
});
// executes
casper.run();
Does your arguments work in other scripts? I'm curious because the documentation shows that arguments are referenced in this way.
casper.echo(casper.cli.has(0));
I'm wondering if maybe this is the issue?