NappDrawer widget fails to build android package and gives error - titanium-mobile

I am working on Titanium SDK and needs to implement slider style menu.
For this I found NappDrawer a useful widget and it successfully works on iOS devices and simulators. But when I tried to build the same package on Android devices, it gives me error and 'Unfortunately stopped' alert message.
I have placed the code on Google Drive.
I have registered the same issue here as well.
The error which I encounter is:
[INFO] : Installing apk: /Users/paresh.thakor/Documents/Titanium Studio Workspace/TestingPull/build/android/bin/TestingPull.apk
[INFO] : Installing app on device: Hudl HT7S3
[INFO] : App successfully installed
[INFO] : Starting app: com.investis.pullref/.TestingpullActivity
[INFO] : Application pid: 21167
[INFO] : Project built successfully in 38s 54ms
-- Start application log -----------------------------------------------------
[INFO] : TiApplication: (main) [0,0] checkpoint, app created.
[INFO] : TiApplication: (main) [49,49] Titanium 3.2.3 (2014/04/22 10:17 b958a70)
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 3.101MB for 432012-byte allocation
[INFO] : TiApplication: (main) [291,340] Titanium Javascript runtime: v8
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
[WARN] : V8Object: Runtime disposed, cannot set property 'userAgent'
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 4.909MB for 1536016-byte allocation
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.investis.pullref.TestingpullActivity#41bbfcb8
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x418f5930)
[ERROR] : TiApplication: (main) [143,143] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.investis.pullref/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null; Titanium 3.2.3,2014/04/22 10:17,b958a70
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.investis.pullref/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
[ERROR] : TiApplication: at android.app.ActivityThread.access$600(ActivityThread.java:141)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5041)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[ERROR] : TiApplication: Caused by: java.lang.NumberFormatException: Unable to convert null
[ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:407)
[ERROR] : TiApplication: at dk.napp.drawer.Drawer.processProperties(Drawer.java:343)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185)
[ERROR] : TiApplication: at dk.napp.drawer.DrawerProxy.windowCreated(DrawerProxy.java:145)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:452)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:528)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5104)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
[ERROR] : TiApplication: ... 11 more
[INFO] : Process: Sending signal. PID: 21167 SIG: 9

The problem is resolved. The problem was I am using ANIMATION_FADE on Android, which is iOS-only. So the change of animation resolved my issue.

Related

JHipster 7.1.0: Failed to use jdl-import, throws Error looking for otherEntity User at

Im using java Openjdk 11.0.11, JHipster 7.1.0 and node v14.17.3
Im creating a simple microservice (one backend and one gateway) but JHipster fails to create using the jdl command (jdl-import), it throws
Error: Error looking for otherEntity User at Tag,Product,Blog,Post
at /Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/generators/entity/index.js:560:19
at Array.forEach (<anonymous>)
at EntityGenerator.loadRelationships (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/generators/entity/index.js:556:36)
at Object.<anonymous> (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:1024:25)
at /Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:49:25
at new Promise (<anonymous>)
at /Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:26:19
at runLoop.add.once.once (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:1025:11)
at Immediate.<anonymous> (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/node_modules/grouped-queue/lib/subqueue.js:48:34)
at processImmediate (internal/timers.js:464:21)
INFO! Generator app child process exited with code 1
ERROR! Error executing app --reproducible --no-force --with-entities --no-dry-run --no-whitespace --no-bail --no-skip-regenerate --no-skip-yo-resolve --from-jdl --no-skip-cache --no-skip-install --no-force-install --no-ask-answered --no-defaults --no-skip-git
Error: Error executing app --reproducible --no-force --with-entities --no-dry-run --no-whitespace --no-bail --no-skip-regenerate --no-skip-yo-resolve --from-jdl --no-skip-cache --no-skip-install --no-force-install --no-ask-answered --no-defaults --no-skip-git
at ChildProcess.<anonymous> (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/cli/import-jdl.js:194:16)
at ChildProcess.emit (events.js:375:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
It does create the folders blogBackend, blogGateWat and docker-compose .... but the folder blogBackend is empty.
If I move to blogGateWay and run: mvn clean install
I get an exception also;
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[ERROR] java.util.ServiceConfigurationError: org.junit.platform.launcher.TestExecutionListener: Provider reactor.blockhound.junit.platform.BlockHoundTestExecutionListener could not be instantiated
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:16 min
[INFO] Finished at: 2021-07-20T09:32:12+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project blog-gate-way: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/carestra/_A/repos/JHipster/microservices/blog1/blogGateWay/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] java.util.ServiceConfigurationError: org.junit.platform.launcher.TestExecutionListener: Provider reactor.blockhound.junit.platform.BlockHoundTestExecutionListener could not be instantiated
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] java.util.ServiceConfigurationError: org.junit.platform.launcher.TestExecutionListener: Provider reactor.blockhound.junit.platform.BlockHoundTestExecutionListener could not be instantiated
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
I will post the instantiated error as a separate question.
Any idea how to solve this?
Here is the jdl-file (blog.jdl) that I use:
application {
config {
applicationType gateway,
baseName blogGateWay,
packageName com.carestra.learn.jhipster.gateway,
authenticationType jwt,
serviceDiscoveryType eureka,
buildTool maven,
reactive true, // default true
skipClient false,
skipServer false,
skipUserManagement false,
databaseType sql,
prodDatabaseType postgresql,
devDatabaseType h2Disk,
cacheProvider ehcache,
testFrameworks [cypress]
}
entities *
}
application {
config {
applicationType microservice,
baseName blogBackend,
packageName com.carestra.learn.jhipster.backend,
authenticationType jwt,
serviceDiscoveryType eureka,
buildTool maven,
reactive true,
skipClient true,
skipUserManagement true,
clientFramework react,
databaseType sql,
prodDatabaseType postgresql,
devDatabaseType h2Disk,
cacheProvider hazelcast,
enableHibernateCache true,
testFrameworks [cypress]
}
entities *
}
entity Blog {
name String required minlength(3)
handle String required minlength(2)
}
entity Post {
title String required
content TextBlob required
date Instant required
}
entity Tag {
name String required minlength(2)
}
entity Product {
title String required
price BigDecimal required min(0)
image ImageBlob
}
relationship ManyToOne {
Blog{user(login)} to User
Post{blog(name)} to Blog
}
relationship ManyToMany {
Post{tag(name)} to Tag{post}
}
microservice * with blogBackend
deployment {
deploymentType docker-compose
appsFolders [blogGateWay, blogBackend]
dockerRepositoryName "carestra"
serviceDiscoveryType eureka
}
Steps to reproduce:
1 - Create folder blog
2 - Move to folder blog
3 - Run: jhipster jdl blog.jdl
4 - Mover to blogGateWay
5 - Run: mvn clean install
Running: jhpster info om folder blog gives me;
jhipster info
INFO! Using JHipster version installed globally
Welcome to the JHipster Information Sub-Generator
##### **JHipster Version(s)**
```
/<intentionally removed info>/blog
└── (empty)
```
cat: no such file or directory: .yo-rc.json
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
<details>
<summary>.yo-rc.json file</summary>
<pre>
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
<details>
<summary>JDL entity definitions</summary>
<pre>
</pre>
</details>
##### **Environment and Tools**
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
Eclipse OpenJ9 VM AdoptOpenJDK-11.0.11+9 (build openj9-0.26.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20210421_957 (JIT enabled, AOT enabled)
OpenJ9 - b4cc246d9
OMR - 162e6f729
JCL - 7796c80419 based on jdk-11.0.11+9)
git version 2.23.0
node: v14.17.3
npm: 6.14.13
Docker version 20.10.7, build f0df350
docker-compose version 1.29.2, build 5becea4c
No change to package.json was detected. No package manager install will be executed.
Congratulations, JHipster execution is complete!
Sponsored with ❤️ by #oktadev.
Running: jhpster info om folder blogGateWay gives me;
jhipster info
INFO! Using JHipster version installed locally in current project's node_modules
Welcome to the JHipster Information Sub-Generator
##### **JHipster Version(s)**
```
blog-gate-way#0.0.1-SNAPSHOT /<intentional removed>/blog/blogGateWay
└── (empty)
```
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
<details>
<summary>.yo-rc.json file</summary>
<pre>
{
"generator-jhipster": {
"authenticationType": "jwt",
"clientFramework": "angularX",
"serverPort": "8080",
"serviceDiscoveryType": "eureka",
"skipUserManagement": false,
"withAdminUi": true,
"baseName": "blogGateWay",
"buildTool": "maven",
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"cacheProvider": "no",
"enableHibernateCache": false,
"enableSwaggerCodegen": false,
"enableTranslation": true,
"jhiPrefix": "jhi",
"languages": ["en"],
"messageBroker": false,
"prodDatabaseType": "postgresql",
"searchEngine": false,
"skipClient": false,
"testFrameworks": ["cypress"],
"websocket": false,
"applicationType": "gateway",
"packageName": "com.carestra.learn.jhipster.gateway",
"packageFolder": "com/carestra/learn/jhipster/gateway",
"reactive": true,
"skipServer": false,
"jhipsterVersion": "7.1.0",
"clientPackageManager": "npm",
"dtoSuffix": "DTO",
"entitySuffix": "",
"clientTheme": "none",
"clientThemeVariant": "",
"applicationIndex": 0,
"applications": {
"blogBackend": {
"serverPort": "8081",
"applicationIndex": 1
}
},
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"blueprints": [],
"otherModules": [],
"pages": [],
"nativeLanguage": "en",
"creationTimestamp": 1626765856461,
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"devServerPort": 4200,
"entities": ["Tag", "Product", "Blog", "Post"],
"lastLiquibaseTimestamp": 1626766096000
}
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
<details>
<summary>JDL entity definitions</summary>
<pre>
entity Tag {
name String required minlength(2)
}
entity Product {
title String required
price BigDecimal required min(0)
image ImageBlob
}
entity Blog {
name String required minlength(3)
handle String required minlength(2)
}
entity Post {
title String required
content TextBlob required
date Instant required
}
relationship ManyToOne {
Blog{user(login)} to User
Post{blog(name)} to Blog
}
relationship ManyToMany {
Post{tag(name)} to Tag{post}
}
microservice Tag, Product, Blog, Post with blogBackend
clientRootFolder Tag, Product, Blog, Post with blogBackend
</pre>
</details>
##### **Environment and Tools**
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
Eclipse OpenJ9 VM AdoptOpenJDK-11.0.11+9 (build openj9-0.26.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20210421_957 (JIT enabled, AOT enabled)
OpenJ9 - b4cc246d9
OMR - 162e6f729
JCL - 7796c80419 based on jdk-11.0.11+9)
git version 2.23.0
node: v14.17.3
npm: 6.14.13
Docker version 20.10.7, build f0df350
docker-compose version 1.29.2, build 5becea4c
No change to package.json was detected. No package manager install will be executed.
Congratulations, JHipster execution is complete!
Sponsored with ❤️ by #oktadev.
The error occurs because you're using JWT authentication type and not OAuth2.
For OAuth2, there is a mechanism in the microservice to extract user data from token and save it to the service's database.
Unfortunately, I could not find any doc about this so I read the code at
https://github.com/jhipster/generator-jhipster/blob/main/utils/entity.js where the test to determine whether to activate this user snapshot is:
entityWithConfig.saveUserSnapshot =
entityWithConfig.applicationType === MICROSERVICE &&
entityWithConfig.authenticationType === OAUTH2 &&
hasBuiltInUserField &&
entityWithConfig.dto === NO_MAPPER;
You can see that there is also a condition about not using a DTO.
This mechanism has some restrictions though because the user's data is updated only when service API gets called, you can imagine cases where a user has been updated in gateway and a background job is running in service that will use a stale version of the user.
For JWT, this has not been implemented because the token does not contain enough data about user, it contains only the login and roles.
So with JWT, can you store in Blog only the ID (or login) of a User and not define a relationship with User entity because it exists only in gateway database.
Almost the same error took me an hour to find the solution. In my case I was writing relationship entity name incorrectly, so writing correct relationship entity name did the trick. I was writing:
ChatToSearch
but my entity name was:
ChatsToSearch
So, I have corrected it and it worked!

How to consume a local HTTPS ASP.NET Core 2.1 API from Android and iOS simulators

I'm working on a Xamarin.Forms app that requires to consume some data exposed in an ASP.NET Core 2.1 API, I'm developing the service and the Xamarin app so everything is running local on MAC OS.
The problem I'm facing is happening when sending a request to the ASP.NET Core API, it seems to be related to the HTTPS protocol enabled by default in ASP.NET Core 2.1, when I run the api it's enabling by default the URL https://localhost:5001 so that is the URL I'm targeting in the Xamarin App.
In Android I can send the request to the API but once the response is sent back, the xamarin app throws the following exception:
Error in AppLoginViewModel.Login Javax.Net.Ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. ---> Java.Security.Cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. ---> Java.Security.Cert.CertPathValidatorException: Trust anchor for certification path not found.
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <fb2a9245146c43afbafe6628542c6726>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeAbstractVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00014] in <fb2a9245146c43afbafe6628542c6726>:0
at Javax.Net.Ssl.HttpsURLConnectionInvoker.Connect () [0x0000a] in <9c89490198b4401e89a0f0bf9e68c7be>:0
at Xamarin.Android.Net.AndroidClientHandler+<>c__DisplayClass43_0.<ConnectAsync>b__0 () [0x0005a] in <9c89490198b4401e89a0f0bf9e68c7be>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <5b7c58d953774179ac771c086a8fa093>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <5b7c58d953774179ac771c086a8fa093>:0
--- End of stack trace from previous location where exception was thrown ---
at Xamarin.Android.Net.AndroidClientHandler+<DoProcessRequest>d__45.MoveNext () [0x0012e] in <9c89490198b4401e89a0f0bf9e68c7be>:0
--- End of stack trace from previous location where exception was thrown ---
at Xamarin.Android.Net.AndroidClientHandler+<SendAsync>d__40.MoveNext () [0x00230] in <9c89490198b4401e89a0f0bf9e68c7be>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpClient+<SendAsyncWorker>d__49.MoveNext () [0x000ca] in <006b95df38b04983b2ec7f1bf1c32608>:0
--- End of stack trace from previous location where exception was thrown ---
at AuditoriasCiudadanas.Mobile.Core.Services.RestService+<Seguridad_ValidarEmailAuditorAsync>d__16.MoveNext () [0x00184] in /Users/jorgeramirez/VSProjects/AuditoriasCiudadanas.Mobile/src/AuditoriasCiudadanas.Mobile.Core/Services/RestService.cs:242
--- End of stack trace from previous location where exception was thrown ---
at AuditoriasCiudadanas.Mobile.Core.Services.AuthService+<ValidarEmailAuditor>d__6.MoveNext () [0x0002b] in /Users/jorgeramirez/VSProjects/AuditoriasCiudadanas.Mobile/src/AuditoriasCiudadanas.Mobile.Core/Services/AuthService.cs:28
--- End of stack trace from previous location where exception was thrown ---
at AuditoriasCiudadanas.Mobile.Core.ViewModels.AppForgotPasswordViewModel+<ValidarEmail>d__27.MoveNext () [0x0006f] in /Users/jorgeramirez/VSProjects/AuditoriasCiudadanas.Mobile/src/AuditoriasCiudadanas.Mobile.Core/ViewModels/AppForgotPasswordViewModel.cs:82
--- End of managed Javax.Net.Ssl.SSLHandshakeException stack trace ---
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:229)
at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:26)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:661)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:539)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:495)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:418)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:339)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:208)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:404)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:375)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:224)
... 12 more
Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
... 24 more
In iOS the behavior is the same, the xamarin app throws an exception when receiving the response
Error in AppLoginViewModel.Login System.Net.WebException: An SSL error has occurred and a secure connection to the server cannot be made. ---> Foundation.NSErrorException: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
"<cert(0x7fce57040e00) s: localhost i: localhost>"
), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://localhost:5001/api/auth, NSErrorFailingURLStringKey=https://localhost:5001/api/auth NSUnderlyingError=0x600001fccc60 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x6000023ce400>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=(
"<cert(0x7fce57040e00) s: localhost i: localhost>"
)}}, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <31AF1DE2-4C56-4480-9F1D-0E9B7C7B8D9A>.<1>"
), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <31AF1DE2-4C56-4480-9F1D-0E9B7C7B8D9A>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x6000023ce400>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}
--- End of inner exception stack trace ---
at System.Net.Http.NSUrlSessionHandler+<SendAsync>d__29.MoveNext () [0x001c3] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/src/Foundation/NSUrlSessionHandler.cs:202
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpClient+<SendAsyncWorker>d__48.MoveNext () [0x00080] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276
--- End of stack trace from previous location where exception was thrown ---
at AuditoriasCiudadanas.Mobile.Core.Services.RestService+<Seguridad_ValidarEmailAuditorAsync>d__16.MoveNext () [0x00184] in /Users/me/RestService.cs:242
--- End of stack trace from previous location where exception was thrown ---
at AuditoriasCiudadanas.Mobile.Core.Services.AuthService+<ValidarEmailAuditor>d__6.MoveNext () [0x0002b] in /Users/me/AuthService.cs:28
--- End of stack trace from previous location where exception was thrown ---
at AuditoriasCiudadanas.Mobile.Core.ViewModels.AppForgotPasswordViewModel+<ValidarEmail>d__27.MoveNext () [0x0006f] in /Users/me/AppForgotPasswordViewModel.cs:82
Is not possible to debug locally using HTTPS? What I need to change to be able to debug the mobile app and the api at the same time?
I will appreciate your help
I had the same problem.
I solved with the Conveyor extension (https://keyoti.com/products/conveyor/index.html?utm_source=conveyor&utm_medium=extension_moreinfo&utm_campaign=conveyor).
In netcore, disable SSL first (project property => debug)

Titanium - Dumping an object to the console

** update / workaround ** : I had to get this pushed live, so I've removed the action bar navigation module I was using and simply use the default android navigation and hardware back button and it works.
I have an app that is using some stack operations for Navigation.
iOS works perfectly, but in Android if I get 3 views deep, when I tap the action bar arrow to go back, it crashes with
[WARN] : W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.kroll.KrollDict.containsKey(java.lang.Object)' on a null object reference
[WARN] : W/System.err: at org.appcelerator.kroll.KrollProxy.hasProperty(KrollProxy.java:531)
[WARN] : W/System.err: at ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:167)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1173)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:513)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:504)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:482)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:520)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:504)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:482)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:520)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:504)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:482)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:692)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:585)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:872)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1095)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:360)
[WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98)
[WARN] : W/System.err: at android.os.Looper.loop(Looper.java:148)
[WARN] : W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
[WARN] : W/System.err: at java.lang.reflect.Method.invoke(Native Method)
[WARN] : W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[WARN] : W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[ERROR] : TiExceptionHandler: (main) [7825,17084] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [0,17084] - In ti:/view.js:22,8
[ERROR] : TiExceptionHandler: (main) [0,17084] - Message: Uncaught Attempt to invoke virtual method 'boolean org.appcelerator.kroll.KrollDict.containsKey(java.lang.Object)' on a null object reference
[ERROR] : TiExceptionHandler: (main) [0,17084] - Source: _add.call(this, child);
[ERROR] : V8Exception: Exception occurred at ti:/view.js:22: Uncaught Attempt to invoke virtual method 'boolean org.appcelerator.kroll.KrollDict.containsKey(java.lang.Object)' on a null object reference
[ERROR] : V8Exception: Attempt to invoke virtual method 'boolean org.appcelerator.kroll.KrollDict.containsKey(java.lang.Object)' on a null object reference
During my attempts at debugging, the problem occurs when its poping views off the stack. I have an object called stack and I'd like to dump that to the console so I can look at what is in it, or if it is indeed empty.
I've tried Ti.API.info(JSON.stringify(stack)) but that results in a serialization error.
Any idea how I can dump the stack object or view what it contains at a specific point?

Errors after running Hyperloop sample app

I tried to run the Hyperloop Sample app but, even if it compiles fine, I get lots of errors anytime I tap any of the tableview cells:
[ERROR] : Script Error {
[ERROR] : column = 26;
[ERROR] : line = 7;
[ERROR] : message = "Can't find variable: Hyperloop";
[ERROR] : sourceURL = "file:///Users/sportgoofy/Library/Developer/CoreSimulator/Devices/AC1AEB23-14C4-44A2-9790-7025AB7BE76F/data/Containers/Bundle/Application/68239ABB-3492-4A9F-8F45-7C98F710B230/Hyperloop_Sample.app/hyperloop/uikit/uilabel.js";
[ERROR] : }
[ERROR] : Script Error Module "hyperloop/uikit/uilabel" failed to leave a valid exports object
[ERROR] : ErrorController is up. ABORTING showing of modal controller
[ERROR] : Script Error {
[ERROR] : column = 26;
[ERROR] : line = 7;
[ERROR] : message = "Can't find variable: Hyperloop";
[ERROR] : sourceURL = "file:///Users/sportgoofy/Library/Developer/CoreSimulator/Devices/AC1AEB23-14C4-44A2-9790-7025AB7BE76F/data/Containers/Bundle/Application/68239ABB-3492-4A9F-8F45-7C98F710B230/Hyperloop_Sample.app/hyperloop/localauthentication/lacontext.js";
[ERROR] : }
[ERROR] : Script Error Module "hyperloop/localauthentication/lacontext" failed to leave a valid exports object
[ERROR] : ErrorController is up. ABORTING showing of modal controller
[ERROR] : Script Error {
[ERROR] : column = 26;
[ERROR] : line = 7;
[ERROR] : message = "Can't find variable: Hyperloop";
[ERROR] : sourceURL = "file:///Users/sportgoofy/Library/Developer/CoreSimulator/Devices/AC1AEB23-14C4-44A2-9790-7025AB7BE76F/data/Containers/Bundle/Application/68239ABB-3492-4A9F-8F45-7C98F710B230/Hyperloop_Sample.app/hyperloop/uikit/uiview.js";
[ERROR] : }
[ERROR] : Script Error Module "hyperloop/uikit/uiview" failed to leave a valid exports object
[ERROR] : ErrorController is up. ABORTING showing of modal controller
What happens?
You probably ran into https://jira.appcelerator.org/browse/TIMOB-20469 which has been fixed recently. We hope to have a new HL beta out this week.

wro4j less processing fails for bootstrap 3.1.0

I'm running wro4j-maven-plugin 1.7.3 against the latest bootstrap less sources (3.1.0) and get the following exception:
Failed to execute goal ro.isdc.wro4j:wro4j-maven-plugin:1.7.3:run (default) on project dezolve-web: Exception occured while processing: ro.isdc.wro.WroRuntimeException: Could not execute the script because:
[ERROR] {
[ERROR] "type": "Parse",
[ERROR] "message": "Syntax Error on line 1476",
[ERROR] "index": 43910.0,
[ERROR] "filename": null,
[ERROR] "line": 1476.0,
[ERROR] "column": 25.0,
[ERROR] "extract": [
[ERROR] " padding-right: (#grid-gutter-width / 2);",
[ERROR] " &:extend(.clearfix all);",
[ERROR] "}"
[ERROR] ]
[ERROR] }, class: ro.isdc.wro.WroRuntimeException,caused by:
[ERROR] -> [Help 1]
I get the same problem in m2e - it this relating to Bootstrap needing a newer version of LESS?
As per #alexo's comment above, changing using the less4j processor over the lessCss processor has resolved this issue.
So my wro.properties now looks like:
preProcessors=cssImport,semicolonAppender
postProcessors=less4j,cssMinJawr

Resources