Pb on mobile compilation source

Hello , Can anyone test on browser and create Apk with cordova ?

Do you talk about this project : https://github.com/axelor/axelor-mobile ?

Yes , this project , compile ans run but on thé web no possible to login . Ans no possible to build apk

It look like a CORS issue for the login :

A redirection in the Axelor ERP look like to cause this, perhaps there is a patch in the new version ?
I tested in 5.1

Perhaps but works with the apk on mobile ( get apk from playstore )

Change cors on application.properties ,

CORS configuration to allow cross origin requests


regular expression to test allowed origin or * to allow all (not recommended)

cors.allow.origin = *
cors.allow.credentials = true
cors.allow.headers = Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers

Now on login , no message but no action , still on login page

Ok well, I applied the CORS configuration cited in the previous comment by @bDurtaut in my Axelor properties file.

I have done 2 modifications on the axelor-modile code and it work.
After do npm build , edit your code with these changes :

In this file : https://github.com/axelor/axelor-mobile/blob/master/packages/web-client-adk/src/services/http.rest.js

Line 45 :

// Replace :
return this.http.request(joinPath(url, "callback"), data);
//by this : 
return this.http.request(url, data);

In the generated file /web-client-adk/lib/services/http.rest.js, at the line 95 :

// Replace :
return this.http.request(joinPath(url, "callback"), data);
//by this : 
return this.http.request(url, data);

About the connection form at : http://localhost:3000/

Url must be : http://localhost:8080/customfolder/login.jsp with login.jsp at the end and replace customfolder, and the ip by your configuration.

I do not have the mobile extension installed on my Axelor so it’s not working but if I do F5, I have access to the web-ui :

What I have done and propose you is not the best solution because I edit local files. But the thing is Axelor JS client send a url like this : http://localhost/..../login.jsp/callback and the Axelor ERP does not detect this route like a login request (see axelor-core/com.axelor.auth.AuthFilter.java, serach onAccessDenied method and the isLoginRequest(request, response) return always false.

1 « J'aime »

with the url http://localhost:3000/ , seems good but the login doesn t works , invalid credential message
You have compile this projet and generate an APK ?

I only built with npm build at the start of the project else the code edits are erased. I have acces to the panel and his options.

For the APK, I didn’t test now. Where are you stuck ?

hello ,
when i run "cordova build android "

cordova-android-support-gradle-release: Android platform: V7.1.2+
cordova-android-support-gradle-release: Wrote custom version ‹ 27.+ › to C:\Developpement\erp\axelor-mobile\packages\web-ui\public_app\platforms\android\app\build.gradle
cordova-android-support-gradle-release: Wrote custom version ‹ 27.+ › to C:\Developpement\erp\axelor-mobile\packages\web-ui\public_app\platforms\android\app\src\main\cordova-android-support-gradle-release\properties.gradle
Could not load API for android project C:\Developpement\erp\axelor-mobile\packages\web-ui\public_app\platforms\android\cordova\Api.js

CAn login in the web version ,

with URL http://localhost:8080/customfolder/login.jsp no action
with http://localhost:8080/customfolder/ : credential error

with the apk ( playstore) installed on android no problem ith url like http://localhost:8080/customfolder/

Nothing works , any help is welcome . Nobody have test this source code ? Run application on web ? generate APK with success ?
I was very happy when Axelor publish mobile source , but now …