Error CordovaModuleLoadError - multi device hybrid app in visual studio - ios

I am following the steps here and here to build and simulate a multi device hybrid app in ios.
I followed the steps in the articles and I can see that when I run my multi device hybrid app in visual studio using iphone simulator as the run target, the connected mac device response to the build request. However, the mac terminal will end the build process with the following build error:
Done building 5116: error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
And here is the full terminal output:
IBRAHIM-ALHUSSAINs-Mac-mini:cordova IBRAHIMALHUSSAIN$ vs-mda-remote --secure false
vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.11
Loading resources for language en from /usr/local/lib/node_modules/vs-mda-remote/resources/en/resources.json
Build Retention initialized with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds, maxBuildsToKeep 20
Initialized BuildManager with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 5115
Remote build server listening on [http] port 3000
ios-sim is installed on path at: /usr/local/lib/node_modules/vs-mda-remote/node_modules/ios-sim/build/release/ios-sim
New build request submitted:
/build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release
{ 'accept-language': 'en-US',
host: '192.168.1.11:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 3.5.0-0.2.4; buildCommand: build; configuration: release
Build will be executed under: /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saving build request payload to : /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saved upload to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz
Extracting /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp...
POST /build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release 202 1279ms - 529b
GET /build/tasks/5116 200 3ms - 529b
Extracted app contents from uploaded build request to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp. Requesting build.
Taking 5116 as current build
Building cordova app B8ak بيتك at appDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp
Opened build log file /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/build.log
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
Done building 5116 : error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/5116 200 2ms - 667b
GET /build/tasks/5116/log 200 4ms

This indicates you are using CTP2 of tools for Apache Cordova. Moving to CTP3.1 or VS 2015 RC should resolve your issue.
VS 2015 will also allow you to select the version of Cordova you use though you could see problems with a year old release like Cordova 3.5.0. The default in VS 2015 of 4.3.0 should be compatible and contains numerous bug fixes including security improvements.
VS 2015 will be the supported version of Tools for Apache Cordova. Previous releases were only technology previews.

Related

Completed 500 Internal Server Error in 112ms (MongoDB: 0.0ms) using rails version '5.2.4' error in ssl

Completed 500 Internal Server Error in 112ms (MongoDB: 0.0ms
Errno::ECONNRESET: Connection reset by peer - SSL_connect

Failed to start Quarkus application

I have moved my Quarkus app to a new env and it will not start there. It works localy and on a AzureVM.
I have started the application with :quarkus.debug.print-startup-times
stackTrace :
2022-02-22 11:02:29,889 Build step LoggingResourceProcessor.setupLoggingStaticInit completed in: 5ms
2022-02-22 11:02:29,895 Build step HttpSecurityProcessor.setupAuthenticationMechanisms completed in: 2ms
2022-02-22 11:02:29,899 Build step VertxCoreProcessor.ioThreadDetector completed in: 4ms
2022-02-22 11:02:29,900 Build step BlockingOperationControlBuildStep.blockingOP completed in: 0ms
2022-02-22 11:02:29,911 Build step MutinyProcessor.buildTimeInit completed in: 10ms
2022-02-22 11:02:29,953 Build step QuarkusSecurityCommonProcessor.registerPasswordProvider completed in: 41ms
2022-02-22 11:02:29,957 Build step DataSourcesExcludedFromHealthChecksProcessor.produceBean completed in: 3ms
2022-02-22 11:02:29,985 Build step SmallRyeOpenApiProcessor.classLoaderHack completed in: 28ms
2022-02-22 11:02:29,992 Build step SmallRyeContextPropagationProcessor.buildStatic completed in: 6ms
2022-02-22 11:02:29,994 Build step SmallRyeHealthProcessor.build completed in: 1ms
2022-02-22 11:02:29,995 Build step AgroalProcessor.generateDataSourceSupportBean completed in: 0ms
2022-02-22 11:02:29,995 Build step NativeImageConfigBuildStep.build completed in: 0ms
2022-02-22 11:02:29,998 Build step SecurityProcessor.gatherSecurityChecks completed in: 2ms
2022-02-22 11:02:29,999 Build step SyntheticBeansProcessor.initStatic completed in: 0ms
2022-02-22 11:02:30,022 Build step SmallRyeMetricsProcessor.registerMetricsFromAnnotatedMethods completed in: 22ms
2022-02-22 11:02:30,198 Build step ArcProcessor.generateResources completed in: 176ms
2022-02-22 11:02:30,201 Build step ResteasyCommonProcessor.setupResteasyInjection completed in: 2ms
2022-02-22 11:02:30,204 Build step SmallRyeMetricsProcessor.build completed in: 3ms
2022-02-22 11:02:30,335 Build step ResteasyStandaloneBuildStep.staticInit completed in: 130ms
2022-02-22 11:02:30,340 Build step SmallRyeMetricsProcessor.createRoute completed in: 4ms
2022-02-22 11:02:30,358 Build step BootstrapConfigSetupBuildStep.setupBootstrapConfig completed in: 16ms
2022-02-22 11:02:30,359 Build step QuarkusSecurityCommonProcessor.registerPasswordProviderForNative completed in: 0ms
2022-02-22 11:02:30,360 Build step NettyProcessor.eagerlyInitClass completed in: 0ms
2022-02-22 11:02:30,361 Build step VertxCoreProcessor.createVertxThreadFactory completed in: 0ms
2022-02-22 11:02:30,361 Build step VertxCoreProcessor.createVertxContextHandlers completed in: 0ms
2022-02-22 11:02:30,362 Build step SmallRyeMetricsProcessor.dropRegistriesAtShutdown completed in: 0ms
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/oas/rekvirent/quarkus-app/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/oas/rekvirent/quarkus-app/lib/main/ch.qos.logback.logback-classic-1.2.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Slf4jLoggerFactory]
2022-02-22 11:02:30,786 Build step VaultProcessor.init completed in: 424ms
2022-02-22 11:02:30,796 Build step SmallRyeMetricsProcessor.registerBaseAndVendorMetrics completed in: 9ms
Feb 22, 2022 11:02:29 AM io.quarkus.config
WARN: Unrecognized configuration key "%s" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Feb 22, 2022 11:02:30 AM org.jboss.resteasy.resteasy_jaxrs.i18n
INFO: RESTEASY002225: Deploying javax.ws.rs.core.Application: class MyDemoApplication
Feb 22, 2022 11:02:30 AM io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider
WARN: Default DNS servers: [/8.8.8.8:53, /8.8.4.4:53] (Google Public DNS as a fallback)
Feb 22, 2022 11:02:31 AM io.quarkus.runtime.ApplicationLifecycleManager run
ERROR: Failed to start application (with profile prod)
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
The new env does not have have Connection to internet , could that be a problem ?

Flasgger execution is a success but not showing the XML body

While Deploying iris prediction model using flasgger API, i can enter the lengths and widths of the iris flower with http/200 ok , but i do not see an xml output with the prediction results.
From ipython notebook:
Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)
127.0.0.1 - - [20/Jan/2020 17:16:23] "GET /predict?s_length=3.2&s_width=2.0&p_length=3.0&p_width=4.5 HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:23] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [20/Jan/2020 17:16:47] "GET /apidocs/ HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:47] "GET /flasgger_static/swagger-ui.css HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:47] "GET /flasgger_static/swagger-ui-bundle.js HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:47] "GET /flasgger_static/swagger-ui-standalone-preset.js HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:48] "GET /flasgger_static/lib/jquery.min.js HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:48] "GET /apispec_1.json HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:16:48] "GET /flasgger_static/favicon-32x32.png HTTP/1.1" 200 -
127.0.0.1 - - [20/Jan/2020 17:17:03] "GET /predict?s_length=4.2&s_width=5.6&p_length=2.6&p_width=6.3 HTTP/1.1" 200 -
Hope you all are keeping well.
So i found the problem after few days of struggling with it, looking for solution ,I guess i was too lazy to post it on GitHub or maybe got busy , the error indicated above was a result of incomplete XML missing 200 body for an HTTP Response , which did not output any XML Result when I entered the input parameters and run the prediction from the GUI , which is expected in my case.
So it is important that we provide a complete XML body with 200 response , we can also add the kind of results you would expect under the 200 XML Body for the prediction based on your Project.
Adding the 200 in the XML body as shown below, fixed the problem.
def predict_iris_file():
"""Example file endpoint returning a prediction of iris
---
parameters:
- name: input_file
in: formData
type: file
required: true
responses:
200:
description: "0: Iris-setosa, 1: Iris-versicolor, 2: Iris-virginica"
"""
Regards
akudnaver
Sorted the issue.
Responses should be in the same indent as parameters and 200 should be indented below responses

Log output too verbose - how to change log level?

I'm trying to debug my simple Rails app and find navigating and printing with puts works well but the log in Bash is way too verbose. I've looked through lots of questions/responses here and have tried some of them but without success. I tried importing the quiet_assets Gem with
gem 'quiet_assets', group: :development
and have tried changing log levels to :error in production.rb
config.log_level = Logger::error
But I still get all the GET requests of Assets when navigating making review of logs difficult.
Worth noting I've tried restarting the server and ran bundle just in case. I did hard refresh even though browser cache shouldn't have anything to do with this.
Here's example navigation:
20:08:55 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:55] "GET /application.js HTTP/1.1" 304 - 0.0185
20:08:55 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:55] "GET /application.css HTTP/1.1" 304 - 0.0790
20:08:56 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:56] "GET /brands/46 HTTP/1.1" 304 - 0.0111
20:08:56 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:56] "GET /application.js HTTP/1.1" 304 - 0.0062
20:08:56 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:56] "GET /application.css HTTP/1.1" 304 - 0.0066
20:08:57 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:57] "GET /brands/46 HTTP/1.1" 304 - 0.0105
20:08:57 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:57] "GET /application.js HTTP/1.1" 304 - 0.0056
20:08:57 web.1 | 127.0.0.1 - - [22/Oct/2014 20:08:57] "GET /application.css HTTP/1.1" 304 - 0.0063
20:09:13 web.1 | E, [2014-10-22T20:09:13.695412 #5880] ERROR -- : worker=0 PID:5916 timeout (16s > 15s), killing
20:09:13 web.1 | E, [2014-10-22T20:09:13.704183 #5880] ERROR -- : reaped #<Process::Status: pid 5916 SIGKILL (signal 9)> worker=0
20:09:13 web.1 | I, [2014-10-22T20:09:13.710805 #5923] INFO -- : worker=0 ready
It seems you are seeing production log, are you? if that is the case quiet_assets should be included in production too.
gem 'quiet_assets'

Rails shows incorrect time spent in a request

When I do-
$ time curl 'http://localhost:3000'
I get this: 0.00s user 0.00s system 0% cpu 1.270 total
Gem 'rack-mini-profiler' also show time taken almost same as curl.
But in the rails log, I see-
Completed 200 OK in 103ms (Views: 72.7ms | ActiveRecord: 5.0ms)
Why there is time difference of about 1 second?
Curl and rails server both are running on my development machine.
"time curl" is timing how long the curl client takes to fetch Rails content, ie it's the client time.
The Rails log is showing you the server time.
You did not specify that but if you are running development mode, there is classes reloading and assets compilation, which heavily impacts response time. But it does not affect production.
Here is what I got in my rails 4.2 application (first curl, than corresponding excerpts from log):
curl 'http://localhost:3000' 0.01s user 0.00s system 0% cpu 1.817 total
curl 'http://localhost:3000' 0.01s user 0.00s system 2% cpu 0.366 total
Completed 200 OK in 1254ms (Views: 1206.2ms | ActiveRecord: 13.9ms)
127.0.0.1 - - [04/Oct/2014:19:48:52 +0200] "GET / HTTP/1.1" 200 - 1.6863
Completed 200 OK in 279ms (Views: 278.7ms | ActiveRecord: 0.0ms)
127.0.0.1 - - [04/Oct/2014:19:49:41 +0200] "GET / HTTP/1.1" 200 - 0.2895
While in production:
curl 'http://localhost:3000' 0.01s user 0.00s system 3% cpu 0.329 total
curl 'http://localhost:3000' 0.00s user 0.01s system 11% cpu 0.090 total
I, [2014-10-04T19:54:02.739988 #27830] INFO -- : Completed 200 OK in 143ms (Views: 123.0ms | ActiveRecord: 6.3ms)
I, [2014-10-04T19:54:17.521175 #27830] INFO -- : Completed 200 OK in 41ms (Views: 40.9ms | ActiveRecord: 0.0ms)
So differences persist there, but it's probably due to time for send request from curl to server and then to receive the response. I still think that bigger differences in development are caused by reloading and compiling.

Resources