Support

Home Forums Event Espresso Premium Mobile ticketing 404 error (2)

Mobile ticketing 404 error (2)

Posted: January 24, 2013 at 11:43 pm

Viewing 27 reply threads


dgreen

January 24, 2013 at 11:43 pm

I’m trying to use the iOS app and can’t seem to get it working. I initially had the “Blog returned invalid data” but that magically disappeared – not sure why. I’m now facing the “sorry, can’t log in” HTTP 404 Not Found error. (actually i just upgraded from WP 3.5 to 3.5.1 today, and the error changed today, not sure if that was the reason).

I have disabled every plugin except the Event Espresso plugins, and gone to the default twentyten theme to no avail.

I know xmlrpc is working because the WordPress iOS app connects and pulls data just fine.

I’ve validated permissions of the directory (755) and the location (wordpress root).

Looking at the logs I see the 404 error on the POST, but don’t know what may be missing.

Any advice on how to troubleshoot this? Any debug options to show the details of the failing xmlrpc post from your app?

Installation details:
Wordpress 3.5.1
Installed/Activated:
Event Espresso Version 3.1.29.1.P
Event Espresso – Calendar Version 2.0.4
Event Espresso – Members Addon Version 1.9.6
Event Espresso – Ticketing Version 2.0.9

Thanks for your help!

  • This topic was modified 4 years, 9 months ago by Garth.


Josh

  • Support Staff

January 25, 2013 at 3:37 pm

Hi there,

Have you installed the mobile app api?

If not, you can download a copy from the ticketing add-on documentation page:
https://eventespresso.com/wiki/espresso-ticketing/


dgreen

January 25, 2013 at 4:50 pm

Josh, thank you for your response.

Yes, sorry, I mentioned I validated the directory permissions were 755, but forgot to say it was the espresso-services directory I was talking about.
So yes, I do have that installed. It is in the wordpress root directory (same dir as wp-config). The espresso-services directory is 755. However all of the files underneath are 644. That is similar to other wordpress files so I’m hoping that is correct.


Josh

  • Support Staff

January 25, 2013 at 6:28 pm

The endpoint URL may not be correct. Also, is this a single site install of WordPress, or a multisite install?


dgreen

January 25, 2013 at 11:19 pm

Ok, so I spent a few more hours trying to figure this out and I think I have a few things that may be helpful. To watch the packets, I created a virtual access point (hotspot) on my laptop and then connected my iphone to that and ran wireshark.
First – endpoint URL:
I found out that the calls from the EE Mobile App were getting a 301 Moved Permanently response. I was putting in just my domain.org in as the endpoint URL, and it was redirecting to the fully qualified URL. So I put in http://www.domain.org/ and it stopped the 301 errors.
Second – request format (POST format):
Now it was getting an 200 OK response on the first call (which is just to the root page domain.org/), but it was getting a 404 Not Found response on the second call, which is actually a POST to xmlrpc.php.
To compare, I also sniffed the traffic when the WordPress iOS app connected, which worked and the response contained the list of xmlrpc methods.
In looking at the POST packet, I noticed they both had a content length of 106, but the EE packet had no content type and was therefor interpreted as Data. The WP packet had a content type of text/xml and was interpreted as XML. (Interpreted by wireshark).
The main difference was “Content-Type: text/xml” in the header of the POST.
To test this, I used WFetch (from Microsoft) to simulate a POST. I copied the xml request (with system.listMethods) in the body of the post with nothing else and submitted it. It returned a 404. I then added a single header, “Content-Type: text/xml” and submitted it, and received the list of methods.

I’m surprised this isn’t happening to more people since it seems like a low level issue. I wonder if there is a setting on apache that tells it to try and read the data as xml or something in xmlrpc.php? I don’t know enough about that.
Not sure if this is something you can/should fix or if it’s a wordpress/apache/php setting… What do you think?


dgreen

January 25, 2013 at 11:20 pm

To answer your other question – this is a single site install.


Josh

  • Support Staff

January 28, 2013 at 8:27 pm

Hi there,

This isn’t something that I’ve seen before.

Have you checked your server’s PHP error logs to see if there are any PHP errors being thrown when you try to use the ticketing add-on?

It sounds like you’ve done a lot of the leg work, but it might help if we have access to the site URL and a temporary admin account to look into this further.

If it’s possible, can you send along a few of those details on our send details page?

https://eventespresso.com/send-login-details/


dgreen

January 28, 2013 at 11:24 pm

Josh,

Thank you for your response. I will send login details.

It is an odd behavior. It seems something is blocking the request before it gets very far. Perhaps wordpress, htaccess or the hosting provider.

As for wordpress, I assume that when you request/post to xmlrpc.php, that is the first file it will load (if it’s not blocked). I put in a debug statement as the first line, and it does not get triggered unless I use the WordPress iOS app. Makes sense, as it’s a 404 error returned.

As for htaccess, I tried commenting out each htaccess rule just to see if that helped, but nothing changed. Makes sense, as none of the rules rewrote to a 404. However, I don’t understand htaccess that well, so I may have missed something.

I have not yet contacted my hosting provider on this issue.

While researching how xmlrpc works and troubleshooting tips, I found that every example had the Content-Type: text/xml; header. It seems to be an important item. I’m not sure what would be blocking a request without that, but I wonder if it’s not a good thing. As I mentioned, the WordPress iOS app has it, but the EE iOS app doesn’t have it in the request sent to the website, which is not related to what plugins, htaccess rules or hosting provider rules are in place.

I will send my login details and look forward to what you find.

Thanks again for your time and assistance!


Josh

  • Support Staff

January 29, 2013 at 9:01 am

I have seen it where there were IP address restrictions set in the .htaccess file, and that ending up blocking the client app’s access, but that doesn’t sound like the case here. We’ll have a look and get back with you.


Josh

  • Support Staff

January 29, 2013 at 2:27 pm

Hi Devan,

Can you check a few things? The FTP creds you sent are working when I try them.

First, where is the xmlrpc.php file on this server?

Also, can you try making a backup copy of the .htaccess file and try a log in with none of the .htaccess rules set?


Josh

  • Support Staff

January 29, 2013 at 3:05 pm

Hi Devan,

I tried to ping your site with a generic XML-RPC client and did not get any response, which is also kind of strange. If you can send us FTP credentials that will work for us, we can investigate further.


dgreen

January 29, 2013 at 3:53 pm

Sorry, I neglected to test the ftp login before I sent it. I have sent updated credentials.

I just tested the WordPress app and it was able to connect and it refreshed to show the latest posts.

I also removed htaccess and tried the EE app. It sent “blog returned invalid data” instead of 404. I’ll have to put my virtual wifi/wireshark setup back together and see what it says. (i’ve put htaccess back for now).

I’ll wait to hear back from you. I don’t want to step on your toes if you’re doing any file changes.

Thanks again!


Seth Shoultes

  • Support Staff

January 29, 2013 at 5:05 pm

Hi Devan,

What version of iOS do you have installed?


dgreen

January 29, 2013 at 5:46 pm

6.1 (had 6.0.x while doing the initial network tracing.


Seth Shoultes

  • Support Staff

January 29, 2013 at 5:57 pm

I cannot login into your site using my iOS device, but I was able to login using an Android device. So I tested our sandbox website and I can view events there using my iOS device. I will send you login details to our sandbox website so you can try testing your iOS device there.

Also, I opened up your error_log that is in your root directory, this is what I see in that file:

[29-Jan-2013 16:55:29 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:23:21 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:23:40 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:23:44 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:49:51 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:49:52 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:51:56 America/Chicago] in xmlrpc.php
[29-Jan-2013 17:52:01 America/Chicago] in xmlrpc.php
[29-Jan-2013 18:46:22 America/Chicago] in xmlrpc.php
[29-Jan-2013 18:46:28 America/Chicago] in xmlrpc.php

Those errors seem to correspond to the times that I tried testing on my iOS device.


Seth Shoultes

  • Support Staff

January 29, 2013 at 6:02 pm

Devan,

I sent you login credentials to our sandbox server. Please try logging in to that site using the iOS app to see if you can connect.


dgreen

January 29, 2013 at 6:29 pm

I was able to connect and view the upcoming events on your sandbox site without issue.

Those debug message (“in xmlrpc.php”) are the message I put in for debugging. Interesting thing is, I don’t see those when I connect with my iOS device – i wasn’t even getting to that page. The fact that you triggered that is interesting.

I was also able to log into my site using an android device. i’ll have to get the virtual hotspot/wireshark thing going to see if there is anything interesting…


Seth Shoultes

  • Support Staff

January 29, 2013 at 6:44 pm

I was looking at your htaccess file and see that it is quite extensive, but I don’t really see anything in there that could be causing issues. I also see that you have (or have had) a few security plugins installed. I wonder if something in one of the security plugins might have left some restrictions in place?


Seth Shoultes

  • Support Staff

January 29, 2013 at 8:32 pm

Okay, I turned on the debug console in Xcode and this is the response I get from your server:
http://www.screencast.com/t/q1itltHZi1iL

This is the response I get from our sandbox server:
http://www.screencast.com/t/Iu83MG7Qh


dgreen

January 29, 2013 at 9:28 pm

That kinda makes sense based on what I’m seeing in the network traffic. I see the redirects and then the followup call/post.
I did some further packet analysis, specifically with htaccess removed. What I found is that without htaccess, any call to xmlrpc.php from EE iOS app gets a 403 forbidden response.
Calls from the WordPress iOS app do not get this response, and works correctly.
I tested again with wfecth it behaved as expected – 403 error without Content-Type header; valid response with it.

Since there is no htaccess in these cases, I suspect the hosting provider has some sort of blocking enabled perhaps blocking POST without this header (who knows?). I have submitted a ticket to validate. I am hoping they can confirm so we can at least pinpoint the cause.


dgreen

January 29, 2013 at 9:39 pm

I may be a day or two for the hosting provider to respond. I’ll post a followup when I receive an response.

Thank you for the time and effort helping to troubleshooting this issue!


dgreen

January 31, 2013 at 10:45 am

Ok, my hosting provider gave me the details behind this. The scenario I had them research was with no htaccess using the EE iOS app. Their response was that this request was being blocked by mod_security with a rule that blocks anything without a Content-Length or Content-Type header.
They considered this a “won’t fix” request – i.e. they won’t disable that rule for security reasons.
Their exact response: “Basically the argument is that this is a valid block since the requests don’t contain a Content-Type header. Would it be possible to modify your applications which are trying to hit the xmlrpc.php file to include, at the very least, this header?”

Also, I don’t have the ability to override any modsecurity rules in htaccess. All the usual commands that people suggest to solve this result in a 500 internal server error.

Thanks again for your effort looking into this. Hopefully this is helpful information. I would prefer to stay with my hosting provider, and I agree with the security stance.
Is this something you would consider fixing in your iOS app?


Josh

  • Support Staff

January 31, 2013 at 11:11 am

Hi Devan,

Thanks for reporting back. That makes sense. This is something we should be able to fix. We’ll ask our iOS developer to take a look. It may take some time with the App store approval process before the update can be shipped.


Seth Shoultes

  • Support Staff

January 31, 2013 at 2:49 pm

Devan,

Does it need to be something like this?
Content-Type: application/x-www-form-urlencoded


dgreen

January 31, 2013 at 4:22 pm

Based on the network traffic I saw from WordPress iOS app, and from examples on the web, I think it just needs to be:

Content-Type: text/xml

I’ll send you a link to a screenshot from wireshark looking at the request packet from EE and WP for comparison.


Seth Shoultes

  • Support Staff

January 31, 2013 at 11:18 pm

Hi Devan,

Let me give you a little background about our iPhone app. We had the app built by a third party developer over a year ago. That developer disappeared, but we were fortunate enough to get the source code before that happened. Since then we have hired a new iOS developer, that is working very hard to build a new version of the iPhone app and an iPad app. He has been able to make a few bug fixes to our existing iOS in the past, but the code is very hard to complicated and uses third party code for the HTTP/XMLRPC support.

So, he is willing to fix it, but it may be very expensive, and the fix will be obsolete in about 3 weeks, when we launch the new version of the app. It will take at least a day or two to fix the current version, then another 7 to 10 days for Apple to approve the update.

If this is an emergency, we can try to give you an add-hoc build. I don’t recommend this, and you probably understand that no matter what we do, it has to go through the iTunes approval process.

So that is where we are at with this. Thoughts?


dgreen

January 31, 2013 at 11:30 pm

Thanks for the context. This is definitely not an emergency. Our major event is in September, and I was just playing around to see if we could use the Tickets functionality. We’d like to try the ticket thing on a few smaller events over the spring/summer.

Thanks again for your responses. Look forward to the new app in a month or so!


Josh

  • Support Staff

April 4, 2013 at 9:30 am

Here’s an update on the new app:

It’s now available in the Apple app store under the name Event Espresso HD. It’s universal, so you can use it with an iPhone, an iPod touch, and the iPad. You’ll need to install the new API (which installs as a WordPress plugin). The new API can be downloaded from your account page after you opt-in to the pre-release channel.

Viewing 27 reply threads

The support post ‘Mobile ticketing 404 error (2)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso