Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V13] ERPNext mobile app status 404 #25213

Closed
kevinpthorne opened this issue Apr 5, 2021 · 15 comments
Closed

[V13] ERPNext mobile app status 404 #25213

kevinpthorne opened this issue Apr 5, 2021 · 15 comments
Labels

Comments

@kevinpthorne
Copy link

kevinpthorne commented Apr 5, 2021

Description of the issue

Both Android and iOS apps report status 404 on trying to login

Context information (for bug reports)

ERPNext/Frappe installation was updated from V13-beta to V13 release.
Output of bench version

erpnext 13.0.0
frappe 13.0.1

Steps to reproduce the issue

  1. Open ERPNext App
  2. Choose your ERPNext installation's URL
  3. Attempt to login

Observed result

image

"https://example.org failed with status 404"

Expected result

The home page

Stacktrace / full error message

From nginx server:

"GET /api/method/frappe.www.desk.get_desk_assets?build_version=1604086648.0 HTTP/1.1" 404 26283 "-" "Mozilla/5.0 (Linux; Android 11; SM-G975U Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.105 Mobile Safari/537.36" "-"

Additional information

Standard ERPNext installation.

@rtdany10
Copy link
Contributor

rtdany10 commented Apr 6, 2021

Getting same error on my v13 production server.

@ArminHaberl
Copy link

I get the same error (v13).

@buff0k
Copy link
Contributor

buff0k commented Apr 7, 2021

Can confirm same error, has existed since January in the development branch as well. Have migrated to version-13 and same issue persists. Note that we have Certbot SSL Certificate installed for ERPNext site.

@shinzuco
Copy link

shinzuco commented Apr 8, 2021

In desk.js, there is an ajax function that called to url = localStorage.server + "/api/method/frappe.www.desk.get_desk_assets";

This is returning a 404 error.

What is the newserver uri?

@shinzuco
Copy link

shinzuco commented Apr 8, 2021

OK Solved it., almost.
in desk.js change line 10 to var url = localStorage.server + "/api/method/frappe.www.app.get_desk_assets";
in line 83 and 84 comment out the following // localStorage.removeItem('session_id'); // window.location = "index.html";

Change the complete code in desk.html to

<html data-theme="{{ desk_theme.lower() }}">
<head>
    <!-- Chrome, Firefox OS and Opera -->
    <meta name="theme-color" content="#0089FF">
    <!-- Windows Phone -->
    <meta name="msapplication-navbutton-color" content="#0089FF">
    <!-- iOS Safari -->
    <meta name="apple-mobile-web-app-status-bar-style" content="#0089FF">
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
    <meta content="utf-8" http-equiv="encoding">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,
			maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="mobile-web-app-capable" content="yes">
    <title>ERPNext</title>

    <link rel="stylesheet" type="text/css" href="css/desk.min.css">
    <link rel="stylesheet" type="text/css" href="css/erpnext.css">
    <link rel="stylesheet" type="text/css" href="css/report.min.css">

</head>
<body>

<div class="centered splash">
    <img src="img/splash.png"
    style="max-width: 100px; max-height: 100px;">
</div>
<div class="main-section">
    <header></header>
    <div id="body"></div>
    <footer></footer>
</div>

</body>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/desk.js"></script>.
<script type="text/javascript" src="js/control.min.js"></script>
<script type="text/javascript" src="js/desk.min.js"></script>
<script type="text/javascript" src="js/erpnext.min.js"></script>
<script type="text/javascript" src="js/form.min.js"></script>
<script type="text/javascript" src="js/libs.min.js"></script>
<script type="text/javascript" src="js/list.min.js"></script>
<script type="text/javascript" src="js/report.min.js"></script>
</html>```



Copy desk.min.css,erpnex.css and report.min.css to your cordova project.
Copy control.min.js , desk.min.js, erpnext.min.js, form.min.js, libs.min.js, list.min.js and report.min.js to your cordova project. Build and enjoy. 

Only bug seems to be tool tip for the toolbar popping up now and then.

@barakatsoft
Copy link

Getting same error on my v13 production server.
any one confirming the above fix ?

@buff0k
Copy link
Contributor

buff0k commented Apr 26, 2021

Update, since the 13.1.0 update the 404 error is gone, now getting 417 error

@krnkris
Copy link
Contributor

krnkris commented Apr 28, 2021

Same 417 error

@dxgerp
Copy link

dxgerp commented May 5, 2021

Generated api call references 'desk' instead of 'app' calling get_desk_assets: /api/method/frappe.www.desk.get_desk_assets?
vs
/api/method/frappe.www.app.get_desk_assets?

Potentially related to changes deployed along with: frappe/frappe#11917
feat(routing): New routing style, not using hashes, also /desk -> /app

@kevinpthorne
Copy link
Author

It just looks like a new app update needs to be pushed with the desk => app change made

@dxgerp
Copy link

dxgerp commented May 18, 2021

replicated on:

erpnext 13.3.0
frappe 13.3.0

@sumitbhanushali
Copy link

please refer to this comment for clarity on the issue frappe/mobile#47 (comment)

@kevinpthorne
Copy link
Author

Closing this issue since there's a repo dedicated to app development (see above).

@rtdany10
Copy link
Contributor

Closing this issue since there's a repo dedicated to app development (see above).

That repo is of another mobile application and not the one we use.

@jlhollowell
Copy link

Posting in a few places here on GitHub....wondering if there is any activity toward fixing the app for v13? I read that the app includes functionality to read bar codes / QR codes into fields...although I am unable to verify this functionality as the app fails with 417 error when I try to login. :-(

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants