How to fix "Failed to load resource" bug when submit form to download file? - ajax

I try to create some script to send a lot of required data to the server after that server will send a generated file back. I know, it's possible to create some link that contain my data like the following code for sending data to server and get the file back.
<a href="domain.com/getExcel.aspx?id=ABC&title=Report1" target="_blank" />
But the maximum length of URL is around 2000 characters that I cannot guarantee the length of data will not over this limit. So I try to use "jQuery Plugin for Requesting Ajax-like File Downloads" to send data to the server by dynamic creating form with hidden input.
Everything works great on IE9. But I got "Failed to load resource" error message when I use it in Google Chrome 9. I think this problem occurs only when response header is set to Attachment.
Demo: http://fiddle.jshell.net/SP3Tx/3/show/
Source: http://jsfiddle.net/SP3Tx/3/
Do you have any walk-around to fix this bug?
Update
I just submit this bug to chromium issue tracker.
http://code.google.com/p/chromium/issues/detail?id=75384

Related

XML Sitemap not working with Google Search Console..?

I have an XML sitemap located at https://store.usbswiper.com/sitemap_index.xml, which as you can see loads just fine.
However, Google Search Console is telling me it can't fetch the sitemap.
When I use this validator it's giving me a successful validation.
I have checked the robots.txt, and it's not blocking anything. It specifices the sitemap URL correctly as well.
Any info on why Google Search Console is giving me this "couldn't fetch" message would be greatly appreciated.
EDIT: When I first ran that validator it gave me this error:
Incorrect http header content-type: "" (expected: "application/xml")
I added a robots.txt and then when I ran it and posted this thread it was validating successfully. I just now tried again and it's failing again with the same message. I don't understand why it's working sometimes and sometimes not. The Search Console hasn't successfully loaded at all no matter what the validator is doing.
Add the full link in console;
for example, add https://example.net/sitemap.xml
rather than just sitemap.xml.

Google Drive API Console: Error saving Drive UI integration page

I have a webapp in production that interacts with Google Drive through Google Drive API.
I need to change some settings in Drive interaction but I can't save.
When I save the Drive UI integration page, I receive this error:
There's a problem at our end.
Please try again. If the problem persists, please let us know using
the "Send feedback" link below. Thanks!
(spying Network console: there is an Internal Server Error in a POST call)
I tried to send feedback for months: nobody answers and the bug is still there.
I tried also to create another project: I can save the first time but then the bug returns.
How can I do? Has someone the same problem?
Is there a way to receive a reply from Google? Is there some workaround?
Thank you.
i think that problem must be Client ID
before adding Client ID, go to the Credentials -> OAuth 2.0 Client IDs
then select edit your Client ID. after that your production site url add to Authorized JavaScript origins and Authorized redirect URIs.
then enter your Client ID in Drive UI integration page
For myself trying to get the Drive UI configured I noticed a couple of errors (that don't have any specific error messages)
When adding in an Open URL it has to be a valid domain, so for instance I tried to test it out with local host, to no avail. However something like https://devbox.app.com worked, but something like https://localhost:8888 does not. Even though https://localhost is a valid javascript origin in the client_id configuration (at least for the app I am working on, not sure about other apps), localhost doesn't work as an open URL.
When adding in the mimeTypes it needs to be in the format */* and can include custom mimeTypes like application/custom+xml and application/custom-name+json not sure for other custom types that are not in a particular format like xml or json. Also not sure about wildcards.
When adding in file extensions do not add in the '.' just the name of the file extension.
The app icon I found only failed to upload the image when the image wasn't the exact dimensions, I actually ended up editing some icons in photoshop to change the pixel x pixel values as a quick work around during dev.
That worked for me to get it to save and I tested it with a file that had a custom mimeType (application/custom-name+xml specifically) and custom file extension!

Post Request is too large in jmeter

Facing the issue while developing the performance script for salesforce application. The issue is, one of the apexremote post call is too large in size. Jmeter is getting hanged if i am trying to click that particular request. Even if I manage to enhance the post request somehow the cursor is not going to end of the line. Hence at the end of the line there is one CSRF which I am not able to correlate. This is only happening for only one apex post request. Because of this my orders are getting rejected while provisioning. I tried by increasing my heapsize in jmeter.bat file but no help.Searched in google but didn't find related queries. I tried the same thing with neoload and I was successfully access and enhanced that particular request.
Has anyone experienced ever! How to resolve this.
Please HELP!
1.Basically for that you need to be Patience after clicking on the request and when the request populate properly copy that post data into notepad++for correlation purpose.
2.Or other solution is Open the .JMX directly into notepad and from there copy the post data into other notepad++ instance and form there with some manipulation you can do correlation.
3.Hope you already changed the property "view.results.tree.max_size=0" in "jmeter.properties" file because may be for next correlation you will get the message like "Response data is to Large".
I had also faced the same issue several times in past, so in that case just copy the complete post body and paste it into notepad++ and modify the content there instead of modifying in jmeter itself, then paste the content back to jmeter and execute it.
This will resolve your issue but have patience while clicking on http request to copy the post body because it'll take some time to open the request properly
I have found out the solution for the very big request for which meter is getting hanged. The best solution is to take the request from the html body of the view result tree listener for the recorded original one and paste in the payload of a new sampler. Then add it in appropriate place accordingly. We can also keep a raw request and make the correlation changes there itself instead of messing around in the big request payload.

Running the URL to clear cache gives blank page in Pentaho

I am using Pentaho CDE. I am trying to clear the cache using the following URL. When I run it in the browser it doesn't give an error but shows a blank page. What can be the cause for this?
http://localhost:8080/pentaho/ServiceAction?solution=admin&path=&action=clear_mondrian_schema_cache.xaction
"admin" in the URL refers to the folder in which the clear_mondrian_schema_cache.xaction file is found. What does "&action" in the URL refer to?
Ok, everyone knows that we can flush Mondrian cache manually.
How: Inside Pentaho User Console, Tools -> Refresh -> Mondrian Schema Cache. After few moments, if everything is right we get message: 'Mondrian Schema Cache Flushed Successfully'.
Ok, what was done down there? 'Mondrian Schema Cache Flushed Successfully' is predefined string for English locale if request returns code 200 (OK). According to this we know that click on it is calling some HTTP request method.
What and where? I'm using Live HTTP Headers plugin in Google Chrome browser. It tells me that PUC is calling:
GET /pentaho/api/mantle/isAuthenticated (and if response is OK?)
GET /pentaho/api/system/refresh/mondrianSchemaCache
If second request return code 200 (OK), PUC write message.
You can try it in your browser: hostname:port/pentaho/api/system/refresh/mondrianSchemaCache
It will clear your schema cache and stay blank page. If you want message, you can write script to collect response from HTTP request.

Unable to record an upload file scenario in JMeter though it is possible by manual effort with specific browser settings

I am working on upload file module that works on internet explorer only and it requires following browser setting mandatory:
"Include local directory path when uploading files to server" should be enabled.
A failure message "Unable to upload file" displays when we do not make required setting in browser while manual attempt else it works fine.
Now when I am trying to record the scenario in JMeter, getting same error message even I made required browser settings.
Note: Additionally, I tried to include these calls by copying from browser tools and paste it in JMeter transaction but get the same result in response.
Have any one experience the same or can help me out?
Thanks,
Nitin
Few things to consider:
Make sure that you use Java implementation of HTTP Request
Make sure that "Use multipart/form-data for POST" is checked
Make sure that you provide a file within "Send Files With the Request" field providing correct path, parameter name and mime-type
If all above has already been applied and you still experience problems I would recommend to capture the data being sent by Internet Explorer with a sniffer (Fiddler, Wireshark, etc.) and compare it to data, being sent by JMeter. They must be the same. If they aren't - you'll need to customize it using HTTP Header Manager, HTTP Cookie Manager, etc. If JMeter is not flexible enough to set all the required parameters via GUI, i.e. still tries to send full path of file instead of just filename or vice versa, you can always go deeper and manually build multi-part post request via Java Request Sampler (see SleepTest and JavaTest source code for details) or via Beanshell which is 100% compatible with Java syntax but may be harder to debug due to it's script nature.
Path to SleepTest and JavaTest files is follows:
/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java
/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java
JMeter sources are available from JMeter download page
Steps to upload the image using jmeter:
locate the image in bin folder Select Post method and check the "Use
multipart/form-data for POST" in HTTP Request
Provide details of Send files With the Request in HTTP Request
Record the Upload scenario and stop button in Jmeter (Image wouldn't upload while recording in Jmeter)
Now before running the script, Go to upload response and give the full path of image in "Send files with request field"
Now Run the script. You can able to see the image

Resources