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

Can't Login via piwik mobile #2244

Closed
anonymous-matomo-user opened this issue Mar 30, 2011 · 20 comments
Closed

Can't Login via piwik mobile #2244

anonymous-matomo-user opened this issue Mar 30, 2011 · 20 comments
Labels

Comments

@anonymous-matomo-user
Copy link

hi,

i tried a lot of time, i can't not login via piwik mobile.

but it works when i use the safari to access the login page.

please tell me how to fix it.

hardware:iphone4
OS:iOS 4.2.1

@sgiehl
Copy link
Member

sgiehl commented Mar 30, 2011

Hi,

What version of piwik itself do you use? As we use the meta data api in piwik mobile, only piwik > 0.7 could work.

What kind of error occured? Any error message displayed?
Have you tried to create another user in piwik itself and use that one in piwik mobile?

Have you already tried another piwik, our online demo for example? Try http://demo.piwik.org and anonymous access.

@anonymous-matomo-user
Copy link
Author

Replying to SteveG:

Hi,

What version of piwik itself do you use? As we use the meta data api in piwik mobile, only piwik > 0.7 could work.

What kind of error occured? Any error message displayed?
Have you tried to create another user in piwik itself and use that one in piwik mobile?

Hi,

The version i used is 1.2.1

the error message show " oops...problem during the request, please try again. "

I already created a test account.

It all the same no matter change the permission to admin or anonymous.

Have you already tried another piwik, our online demo for example? Try http://demo.piwik.org and anonymous access.

@tsteur
Copy link
Member

tsteur commented Mar 30, 2011

Hey hugo5688,

Please, ensure you can answer the following questions with yes:

  • Is your Url to Piwik Server correct?
  • Have you entered correct login and password?
  • Is there any unwanted characters spaces for example in the Piwik Url, username or password?
  • Does your Piwik user have at least "View" permission for one website?

Further:

  • Did you deactivate any APIs (Settings -> Plugins)?
  • Have you tried the Piwik server "http://demo.piwik.org" with anonymous access? Does it work for you?

Greetz Thomas

@tsteur
Copy link
Member

tsteur commented Apr 12, 2011

Piwik Mobile 1.3 is available now. Could you try it with this version again, please?

@tsteur
Copy link
Member

tsteur commented May 1, 2011

Hey hugo5688,

can you just leave a short comment whether this error still occurs?

@mattab
Copy link
Member

mattab commented May 27, 2011

A friend confirmed the issue. Here are steps he did:

  1. log into piwik
  2. click settings
  3. click the '+' sign
  4. put 'http://piwik.domain.com' in the 'piwik access url' box
  5. keep anonymous access off
  6. 7 Type in super user login & password, which work fine in the browser

He said that

  • first time, alert box displayed 'oops... (something else)'
  • second time, nothing - hit 'save', and nothing happens

Maybe this report can help fixing the issue...

Some thoughts

  • There is definitely a problem/bug, but maybe it comes from confusing messaging or help rather than a real bug
  • Maybe the connection to piwik cannot be done for some reasons, in which case an error message should be displayed?
  • in what case do you display "oops..." message?
  • why in second time, there is nothing happening, maybe the credentials are not resubmitted... ? He hits save many times, and nothing happens
  • when no trailing slash to submitted URL, you add it automatically correct?

Thanks :)

@tsteur
Copy link
Member

tsteur commented May 27, 2011

Hi Matt,

I've a look at this next weekend.

The 'oops...' message is displayed in case of an unknown error , see http://dev.piwik.org/trac/browser/mobile/tags/1.3.1/Resources/library/HttpRequest.js#L269
For example:

  • 'Failed to parse response' -> we set this error if we were not able to parse the response
  • 'Manager is shut down.' -> don't know what this exactly means
  • 'No wrapped connection' -> don't know what this exactly means
  • 'Adapter is detached' -> don't know what this exactly means

Maybe there is a parse error? I've currently no Server running having a newer version. Only Piwik Server 1.0. I have to setup one.It definitely works with Piwik Server Version 1.0.

Was there any change since 1.0?

What I do is:
Fetching the tokenAuth via "UsersManager.getTokenAuth". If that was successful and If I get a valid token:
Fetching availableSites to make sure the User has at least view access to one site via "SitesManager.getSitesIdWithAtLeastViewAccess".

  • Yes, we automatically add a trailing slash if not already one is set.
  • Resubmitting the credentials a second time works fine for me, I guess this has to do with the error that occurs.

@mattab
Copy link
Member

mattab commented May 29, 2011

Thomas, thanks for following up.

  • Is it possible that in future release, as well as showing "oops" you append the actual error message fetched? This might help further users debugging.
  • I tried on my friends piwik, and the server is configured in such a way that:

http://example.org/?module=API&method=UsersManager.getTokenAuth&userLogin=admin&md5Password=test does NOT work, but
http://example.org/index.php?module=API&method=UsersManager.getTokenAuth&userLogin=admin&md5Password=test DOES work

In Piwik Mobile, do you make the request to domain/?module=API or to domain/index.php?module=API ?

  • Assuming you put index.php?xxxx I think the problem is because his Piwik returns 8,000 website Ids... so it will maybe not work well. I attach the file returned with all IDs.

Then, do you call the API to get the list of names for each ID?

For example on his piwik, the call to module=API&method=SitesManager.getSitesWithAtLeastViewAccess returns a XML that is 3Mb!!! so, too big.

Maybe the solution would be to implement a "site selector" similar to the one in the Piwik UI. Load by default, the first 10 website Ids and names, and then have a search field to search for another website. The ajax js code is using the API as well: SitesManager.getPatternMatchSites() to search for string matching (and soon also match ID: #2425)

What do you think about the site selector proposal?

@mattab
Copy link
Member

mattab commented May 29, 2011

Attachment:
sites IDS.xml

@tsteur
Copy link
Member

tsteur commented Jun 4, 2011

(In [4865]) refs #2244 display the actual error message in case of a default error

@tsteur
Copy link
Member

tsteur commented Jun 4, 2011

I do now output the "oops" message as well as the actual error message.

Ah! His site requires 'index.php'. There was an error in previous (and the current published) versions that a slash is always added if there is not already a slash at the end, see http://dev.piwik.org/trac/browser/mobile/tags/1.3.1/Resources/views/settings/editaccount.js#L259 .

That means the app adds a slash after 'index.php' which probably causes the error. It's already fixed in trunk http://dev.piwik.org/trac/browser/mobile/trunk/Resources/library/Piwik/Network/AccountRequest.js#L171 . Otherwise I don't put 'index.php' or something else.

When verifying the account credentials I call 'SitesManager.getSitesIdWithAtLeastViewAccess' JSON output and only IDs which should be a bit smaller. But I always request "SitesManager.getSitesWithAtLeastViewAccess" when a user starts the app to get a list of his current sites. I currently don't cache it cause the user's permissions have probably changed (added a new site or removed one).

Damn! So many sites :) We definitely have to implement a selector for sites.

@mattab
Copy link
Member

mattab commented Jun 6, 2011

Cool changes!

Feedback

@tsteur
Copy link
Member

tsteur commented Oct 17, 2011

Issue will be fixed in Piwik Mobile 1.6 release.

Please reopen if it is not working for you.

@anonymous-matomo-user
Copy link
Author

Same problem happened in Iphone4, ios 4.3.1, with piwik mobile 1.6.2

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik Mobile Client milestone Jul 8, 2014
@tsteur tsteur added this to the Piwik Mobile 1 milestone Jul 25, 2014
@multiformeingegno
Copy link

I'm getting the same issue now on latest version. I can login from desktop just fine. I checked my url (both with slash or index.php appended), username and password. I get the "failed to parse response" message and then it says the request status is "no error".

@tsteur
Copy link
Member

tsteur commented Dec 21, 2014

It sounds like there seems to be some kind of redirect maybe. Make sure to add a www. if needed etc. Maybe you can send us the URL you are trying to use to hello at piwik.org ?

@multiformeingegno
Copy link

https://128.199.44.7/piwik/

On Sun, Dec 21, 2014 at 9:40 PM, Thomas Steur notifications@github.com
wrote:

It sounds like there seems to be some kind of redirect maybe. Make sure to add a www. if needed etc. Maybe you can send us the URL you are trying to use to hello at piwik.org ?

Reply to this email directly or view it on GitHub:
#2244 (comment)

@tsteur
Copy link
Member

tsteur commented Dec 21, 2014

I used the same URL and it works just fine for me. I tried to log in as anonymous but get an error of course because I am not allowed to log in which means it works in general. It was able to parse the response. I do get a "response parse error" in case I use only https://128.199.44.7 without the ending /piwik . Can you check your server logs whether there are maybe any redirects or so? I tried to reproduce it on Android. Maybe you are using iOS?

@multiformeingegno
Copy link

No redirects set.. :(
Yes I use iOS

2014-12-21 22:56 GMT+01:00 Thomas Steur notifications@github.com:

I used the same URL and it works just fine for me. I tried to log in as
anonymous but get an error of course because I am not allowed to log in
which means it works in general. It was able to parse the response. I do
get a "response parse error" in case I use only https://128.199.44.7
without the ending /piwik . Can you check your server logs whether there
are maybe any redirects or so? I tried to reproduce it on Android. Maybe
you are using iOS?


Reply to this email directly or view it on GitHub
#2244 (comment)
.

@tsteur
Copy link
Member

tsteur commented Dec 22, 2014

Tried it with iOS and it works as well. Can you maybe try it from a different network? And / or maybe also from another device? BTW: We released an update for iOS today maybe you can give it a try just in case the problem is not related to your server or network.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants