Giter Club home page Giter Club logo

Comments (13)

shprink avatar shprink commented on June 1, 2024

Could you please dump console errors. It is hard to tell what's wrong without it, it could be anything.

https://github.com/shprink/wordpress-hybrid-client/blob/develop/BUILD.md#debug

from hybrid.

gau1991 avatar gau1991 commented on June 1, 2024

Sorry, I missed logs,
Here are are complete error:

 Uncaught TypeError: Cannot read property 'getPreferredLanguage' of undefined 

Showing error for following block:

          getPreferredLanguage: function () {
            var q = $q.defer();

            navigator.globalization.getPreferredLanguage(function (result) {
                q.resolve(result);
              },
              function (err) {
                q.reject(err);
              });
            return q.promise;
          },

from hybrid.

shprink avatar shprink commented on June 1, 2024

Ok then you miss a plugin https://github.com/shprink/wordpress-hybrid-client/blob/develop/package.json#L104

Re install it

cordova plugin rm org.apache.cordova.globalization
cordova plugin add org.apache.cordova.globalization

It happens often that plugins are not correctly installed with Cordova.

from hybrid.

gau1991 avatar gau1991 commented on June 1, 2024

Thanks now app is working, but getting this error now:

Request URL: http://example.com/wp-json/posts?filter%5Borderby%5D=desc&filter%5Bpost_status%5D=publish&filter%5Bposts_per_page%5D=6&page=1
Request Method:GET
Status Code:404 Not Found (from cache)

Note: Here http://example.com/wp-json/posts?filter%5Borderby%5D=desc&filter%5Bpost_status%5D=publish&filter%5Bposts_per_page%5D=6&page=1 is working fine in browser.
Is it cache issue?

from hybrid.

shprink avatar shprink commented on June 1, 2024

Give me a link to your WP blog. http://example.com can't be it!

from hybrid.

gau1991 avatar gau1991 commented on June 1, 2024

Hi.. Following is actual URL:

http://linuxontheheads.com/wp-json/posts?filter[orderby]=desc&filter[post_status]=publish&filter[posts_per_page]=6&page=1

from hybrid.

shprink avatar shprink commented on June 1, 2024

Ok so if I understand correctly the request works on the browser but not on Android?

Are you sure your device is online? I am not sure what can cause that.

from hybrid.

gau1991 avatar gau1991 commented on June 1, 2024

Ok so if I understand correctly the request works on the browser but not on Android?

Yes, on browser works fine, but on android getting this error.

Are you sure your device is online?

Yes my device is online, my device and laptop are connected to same wifi

I also observed server logs, request is not coming to server. I fear that it might the android cache issue as on chrome logs its showing

Status Code:404 Not Found (from cache)
Request Headers

from hybrid.

shprink avatar shprink commented on June 1, 2024

I have never had this problem. I would appriate if you investigate further and let me know what you can find. Thanks @gau1991 :)

from hybrid.

shprink avatar shprink commented on June 1, 2024

It could be related to the domain white list but I specified *

https://github.com/shprink/wordpress-hybrid-client/blob/develop/config.xml.dist#L11

from hybrid.

gau1991 avatar gau1991 commented on June 1, 2024

Hi, Following steps worked for me:

cordova plugin add cordova-plugin-whitelist

and add <allow-navigation href="http://*/*" /> into config.xml

from hybrid.

shprink avatar shprink commented on June 1, 2024

I created #24 for this problem. Thanks for your help :)

from hybrid.

shprink avatar shprink commented on June 1, 2024

@gau1991

I am having problems installing this plugin on iOS:

Fetching plugin "cordova-plugin-whitelist" via npm
Installing "cordova-plugin-whitelist" for android
Installing "cordova-plugin-whitelist" for ios
Failed to install 'cordova-plugin-whitelist':CordovaError: Plugin doesn't support this project's cordova-ios version. cordova-ios: 3.7.0, failed version requirement: >=4.0.0-dev
    at checkEngines (/Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:116:29)
    at /Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:289:16
    at _fulfilled (/Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/q/q.js:749:13)
    at /Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/q/q.js:557:44
    at flush (/Users/shprink/Sites/wordpress-hybrid-client/node_modules/cordova/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:419:13)
Plugin doesn't support this project's cordova-ios version. cordova-ios: 3.7.0, failed version requirement: >=4.0.0-dev

I will have to find another solution.

from hybrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.