A bizzare unsolvable Google Checkout issue occurs in certain server - magento

I have a site running in Hostgator shared-hosting account with Google Checkout (GC) working since v1.2 - when the site first gone live, the GC works out-of-the-box.
Recently I moved the site to a VPS server and GC stopped working with this error:
Google Checkout: Invalid response from Google Checkout server
I thought it couldn’t be an issue with Magento’s Google Checkout integration but the new VPS server or maybe SSL cert that require further testing, so I moved the site back to the shared server (the GC starts working again!), and then setup a test site with a valid SSL cert, a working GC account.
3 weeks had passed still GC wouldn’t work in the VPS server; I have tried/searched/tested all possibilities along with the help from Hostgator’s support, and we have exhausted all options to a point that we believe it has nothing to do with SSL cert setup nor the server configuration.
From the above error and the log from "var/log/payment_googlecheckout" I reckon it couldn’t redirect to checkout.google.com/schema/2
<order-processing-support>
<request-initial-auth-details>true</request-initial-auth-details>
</order-processing-support>
</checkout-shopping-cart>
[dir] => out
It seems a number of people had experienced the same error before but no one seems to be able to find the cause, and I am starting to think it’s a bug lies on Magento’s Google Checkout module.
If you had this issue before and had it solved, please share. Thanks!

This person seems to have had a similar problem and it was due to an issue with their cURL installation. Have you compared versions from your shared hosting with your VPS? I'd compare: PHP versions, PHP extension versions, php.ini settings, and versions of cURL itself.
If none of that bring about any results, open up app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php and modify the _call() method like this:
// app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php
public function _call($xml)
{
// ... snip ...
$result = #simplexml_load_string($response);
if (!$result) {
// Add this...
Mage::log(var_export($response, true), null, 'google_checkout_debug.log', true);
// ... end
$result = simplexml_load_string('<error><error-message>Invalid response from Google Checkout server</error-message></error>');
}
With this, you will have the exact response from Google logged to var/log/google_checkout_debug.log. Use this to debug what might be going wrong (perhaps there is another error message embedded in the response).
Just remember to remove the code when you're done!

Related

WordPress Website shows 403 error when accessing wp-admin/ajax.php page from front end

I am running a WordPress on an Azure Web app connecting to a MySQL server on a different Windows server. When loading the mentioned page in Chrome, it shows 2 popups 403 & Forbidden. Checking the console throws this error - ecbcc.js:2 POST /wp-admin/admin-ajax.php 403 (Forbidden)
This works fine on FireFox & IE but not on Chrome. Any ideas why?
This is because of your cache. Minified version of JS is causing the issue in chrome browser. Check or purge the cache and check for the permissions applied to cached files as well.
I faced the same issue but it took a long time for me to fix it. Because my solution was not caused by common things like cache, .htaccess, files permissions, etc. I apply all the possible solutions as described here. When nothing worked for me, then I talked with my hosting provider and the issue was on their side. Actually, the server has black-listed my IP.
Below is the reply from the support of my hosting provider:
After checking it, it looks like the issue is caused by trigger
ModSecurity rules.
ModSecurity is an Apache module that works as a web application
firewall. It blocks known exploits and provides protection from a
range of attacks against web applications. However, sometimes,
mod_security may incorrectly determine that a certain request is
malicious, while it is actually legitimate. In such a situation, we
can whitelist the triggered mod_security rule on the server, so that
you can bypass the block.
In order to properly investigate, we need you to share your IP address
with us. You can copy it from here: https://ip.web-hosting.com/
Looking forward to your response.
This error can appear for more than one reason. Except for the accepted answer, if you are using a shared hosting solution as a server then it would be best to contact the support of the service. Also if you use Plesk or Cpanel you can check the server logs to see if there is any false positive rule that from mod_security that catches the error. Then you can find the error that could look something like that:
ModSecurity: Warning. Match of "test file" against "REQUEST_FILENAME" required. [file "/etc/httpd/conf/modsecurity.d/rules/custom/006_i360_4_custom.conf"] [line "264"] [id "77140992"]
You can apply the ID on your firewall exclusion list (if this is provided by your hosting service) and then the server will not block the request anymore.
IMPORTANT: If you are not sure what you are doing, ask your hosting provider for support. Experimenting on live servers/sites is not the best option and I would strongly recommend avoiding it.

Error 404 for rest webservice request in offline app in GeneXus Ev3 U9

I'm developing an offline Android app with Genexus Ev3 U9 and when I try the app in the device I see there is no initial synchronization, even when I try to execute a manual sync the app shuts down. The cat log shows that request made to URLs like http://192.168.12.17/MyAppSmartDevicesEnvironment/gxmetadata/MyApp.android.json
worked fine but when the app tries to get this URL http://192.168.12.17/MyAppSmartDevicesEnvironment/rest/MyAppOfflineDatabase?fmt=json&event=gxchecksync returns 404 I tried the same link in my laptop and it's like the requested resource was not created by GeneXus.
What could be wrong?
There are actually a couple of things you might want to check.
When you accessed http://192.168.12.17/MyAppSmartDevicesEnvironment/gxmetadata/MyApp.android.json you got data but that just means that the virtual directory was successfully created. (which is good of course)
Then you need to check if the WCF module is installed correctly, in order to do that you could try to go to http://192.168.12.17/MyAppSmartDevicesEnvironment/MyAppOfflineDatabase.svc/rest or any other service in your KB. That goes straight to the service implementation. (you can check you web.config file in order to see the actual rewriting rules)
If that works it's certainly a URL Rewrite problem like Sandro and Guscarr suggested.
You can download and install the module from here: http://www.iis.net/downloads/microsoft/url-rewrite
Gcastano,
It seems that you're generating to .net, right?
If so, it could be some problem with iis rewrite module.
Anyway you might check gx software requirements...
It seems that REST services cannot be run on your IIS, as Sandro said, try installing URLRewrite.
Further info at http://wiki.genexus.com/commwiki/servlet/wiki?14575,Android%20-%20FAQ%20and%20Common%20Issues

"Cannot connect to server" while installing ipa through OTA

I have provisioning profile is installed and successfully created the ipa. The ipa will install in Dropbox without any problem, but the same ipa will give the error while installing through OTA.
I have attached the screenshot of the error.
How can i solve the issue. Any help would be appreciated.
Thanks.
The answer may depend on what OTA server you are using.
If you are running your own OTA server, like I am, then the problem may be your URL.
I saw the exact same "Cannot connect to..." error today with my personal OTA server. The problem was with the itms-services URL.
itms-services://?action=download-manifest&url=https://3ea1be94.ngrok.com/TestApp.plist
The .plist file name and the hostname for my &url= parameter were incorrect. Once I fixed them and refreshed the page, everything was fine.
If you are using your own OTA server, check that the &url= paramter is accurate and make sure it is using HTTPS. If you are not running your own OTA server, check with whoever is running it as they may be able to assist.
To proper distribute the IPA file from HTTP you should put a webpage with a Link pointing the itms-services special link for example:
Download App
This manifest file you is very simple, you need the bundleid and the URL to the IPA file
You can find an example of start from this one: https://gist.github.com/kEpEx/777df3cb1fd4bd851409
A couple of important things to consider
Valid certificate is required, and URL from Manifest and IPA should be HTTPS, (I'm not sure if self signed certificated works on this)
Take care of the manifest URL, sometimes you have parameters on the URL, you want to urlencode them or use simplier url
Sometimes you want to auth the users before allowing them to download the manifest or IPA files, take care of this, since cookies on the safari are lost when you click on this link, so if you check for session there based on the cookie you will get the "Cannot connect to" message. You will need to came out with a better aproach like generating temporaty tokens or something like that (this point took me 2 days of work to figure it out why it was failing)

Stage environment for Magento for dummies - 500 internal server error

I'm brand new to server side setup and creating staging environments. I have a magento live environment I've setup, but now I want to setup a stage environment (stage.mystore.com) and practice rolling from stage to live. But, I'm a newb to this and having issues.
I started by following this tutorial to the T, but am currently stuck:
http://www.crucialwebhost.com/kb/setting-up-a-magento-staging-area/
I can load my homepage on the stage subdomain, but any link I click on gives me an "500 internal server error". Secure and unsecure.
I've read around a lot, and it seems like I probably need to either edit something else in my .htaccess or core_config_data but I'm uncertain what to do next.
Can anyone provide more complete step by step instructions for this last part for me?
PhilB's response worked. I just needed to do that change to the varien.php file AND clear out all cookies from my live server in my browser and then I could login. thanks.

Getting a 404 using App Harbor and BitBucket

I'm new to AppHarbour and I'm trying to deploy my MVC app on a free account.
I keep getting a 404 error.
The app is coming from Bit-bucket and it was deployed successfully.
In my Hostnames section i see the following
so i have added the following to the Hosts file in my machine:
176.34.122.158 camelotfaultmanagement.apphb.com
but i still get a 404 ..
What am i doing wrong ?
And a follow-up question how can i edit one of the files to be able to edit the connection ?string to my DB?
It looks like you may not have any successful builds yet - You have to push to Bitbucket to trigger your first build. You can see a list of builds on the app dashboard: https://appharbor.com/applications/camelotfaultmanagement
To use the built-in .apphb.com domain, you don't have to mess with any DNS setup.

Resources