Fine Uploader post to S3 returns response code 0 - fine-uploader

A customer with OSX Mountain Lion can't upload. Issue is present in both Safari and Firefox. I was able to get in remotely and grab some logs. Here is the console output:
[13:02:17.497] [FineUploader 3.8.2] Submitting S3 signature request for 0
[13:02:17.497] [FineUploader 3.8.2] Sending POST request for 0
[13:02:17.568] POST http://removed/signature [HTTP/1.1 200 OK 462ms]
[13:02:18.034] OPTIONS http://mybucket.removed/ [0ms]
[13:02:17.985] no element found # http://removed/the/url/of/the/uploader
[13:02:17.979] [FineUploader 3.8.2] Sending upload request for 0
[13:02:17.984] [FineUploader 3.8.2] Received response status 0 with body:
[13:02:17.986] [FineUploader 3.8.2] Waiting 5 seconds before retrying file.jpg...
The signature part seems to go fine. The post to Amazon just doesn't return anything. Is this a CORS issue? They claim to not be running any virus or security program on their computer. The computer is their own and is on their home network.
Here is the CORS configuration on S3
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>removed</AllowedOrigin>
<AllowedOrigin>removed</AllowedOrigin>
<AllowedOrigin>removed</AllowedOrigin>
<AllowedOrigin>removed</AllowedOrigin>
<AllowedOrigin>removed</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<ExposeHeader>ETag</ExposeHeader>
<AllowedHeader>*</AllowedHeader>
</CORSRule>

Your log message indicates that a response was in fact received, but it was completely empty. However, in your comments, you have indicated that no response was received at all. If that is true, then there are network issues. If the latter is true, then something client-side is interfering with the response, perhaps a browser extension.

Super old question, but OP comments that the bucket name contains a ., which is likely related to the same issue as here:
When bucket names contain a dot, the endpoint needs to be:
s3-{region}.amazonaws.com/{bucket-name}
Without dots, the following works:
{bucket-name}.s3.amazonaws.com

Related

Pre signing AWS S3 files

I have a bucket that allows for open files. I have uploaded a test file called test.gsm and have tried to presign the file by doing
root#server2:~# aws s3 presign s3://dovid-ft/test.gsm --expires-in 604800
https://dovid-ft.s3.amazonaws.com/test.gsm?AWSAccessKeyId=AKIAJSDPJKCCGAZ257VQ&Signature=0zbBU2B%2FKVrqgOXFQNTGh3gme%2Fo%3D&Expires=1625658191
root#server2:~#
If I then try to grab that file I get a 403.
root#server2:~# wget 'https://dovid-ft.s3.amazonaws.com/test.gsm?AWSAccessKeyId=AKIAJSDPJKCCGAZ257VQ&Signature=0zbBU2B%2FKVrqgOXFQNTGh3gme%2Fo%3D&Expires=1625658191'
--2021-06-30 07:49:21-- https://dovid-ft.s3.amazonaws.com/test.gsm?AWSAccessKeyId=AKIAJSDPJKCCGAZ257VQ&Signature=0zbBU2B%2FKVrqgOXFQNTGh3gme%2Fo%3D&Expires=1625658191
Resolving dovid-ft.s3.amazonaws.com (dovid-ft.s3.amazonaws.com)... 52.217.88.204
Connecting to dovid-ft.s3.amazonaws.com (dovid-ft.s3.amazonaws.com)|52.217.88.204|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2021-06-30 07:49:21 ERROR 403: Forbidden.
root#server2:~#
I also tried to decode the HTML of the key to see if that would help and it did not.
root#server2:~# wget 'https://dovid-ft.s3.amazonaws.com/test.gsm?AWSAccessKeyId=AKIAJSDPJKCCGAZ257VQ&Signature=0zbBU2B/KVrqgOXFQNTGh3gme/o=&Expires=1625658191'
--2021-06-30 07:49:37-- https://dovid-ft.s3.amazonaws.com/test.gsm?AWSAccessKeyId=AKIAJSDPJKCCGAZ257VQ&Signature=0zbBU2B/KVrqgOXFQNTGh3gme/o=&Expires=1625658191
Resolving dovid-ft.s3.amazonaws.com (dovid-ft.s3.amazonaws.com)... 52.217.32.100
Connecting to dovid-ft.s3.amazonaws.com (dovid-ft.s3.amazonaws.com)|52.217.32.100|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2021-06-30 07:49:37 ERROR 403: Forbidden.
root#server2:~#
Is there any way to get logs or see what the issue is and why my request is being rejected? As of now the only way to be able to get the file is to make it publicly available which I don't want to do.
It turns out I was using the wrong credentials to presign the file. Why amazon didn't throw an error when I tried to presign them with the wrong credentials is beyond me.
The solution is in wget. after recreating the scenario I wasn't able to download a file via wget also.
wget -O test.gsm "https://yourURL" # and will do.
reference: Amazon AWS S3 signed URL via Wget

Failed to load config from https://10.20.1.98/config.js?room=n...', [TypeError: Network request failed

i am trying to connect jitsi meet server but i am getting this error
Failed to load config from https://10.20.1.98/config.js?room=n...', [TypeError: Network request failed]
i install rocket.chat and jitsi in local server and want to connect my android rocket.chat app to local server and its text messaging is working fine but when i click on video/audio call it
alert me timeout exception for 30 sec and return a white blank screen and it gives us belowenter image description here error in emulator?
Failed to load config from https://10.20.1.98/config.js?room=nimsss6x5hxtgma9wa2wgcv5ex4pubmkhz9jgyq6mfthwd62rghj7ku', [TypeError: Network request failed]
2020-02-23 10:39:12.614 7152-7680/chat.rocket.android.dev E/unknown:ReactNative: console.error: "[__filename]", "<>: ", "Failed to load config from https://10.20.1.98/config.js?room=nimsss6x5hxtgma9wa2wgcv5ex4pubmkhz9jgyq6mfthwd62rghj7ku", {}, stack:
we use self signed certificate (invalid certificate) and i can access config.js file in web browser.
rocket.chat version 3.5.0
I'm not using rocket.chat but in case you can manipulate your app, this could be one way to make it work:
I see, your have your own internal server and you have to install a root certificate on your phone to connect to your server.
If so, you have to do the following things:
Add android:networkSecurityConfig="#xml/network_security_config" to the application tag in your Android Manifest and create the corresponding file to:
app/src/main/res/xml
This is the Content of the network_security_config.xml file:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
So your App knows to use the installed certificate, otherwise it will use the platform Default.
I have to say, this problem appears to many developers, so there could be other solutions, like I found with jitsi-meet.
But this is the way it worked for me.
Hope it helps.

Office 365 gives bad sequence error on laravel

I am trying to user office 365 in my laravel site but for some reason, it does not work and I see the following error in my laravel.log:
[2018-12-04 20:50:59] production.ERROR: Expected response code 354 but got
code "503", with message "503 5.5.1 Bad sequence of commands
" {"exception":"[object] (Swift_TransportException(code: 503): Expected
response code 354 but got code \"503\", with message \"503 5.5.1 Bad
sequence of
commands \" at
/home/forge/owlcrest.co.za/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Tra
nsport/AbstractSmtpTransport.php:457)
[stacktrace]
I am hosting the website with forge.
and all the smtp details are in the .env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=email#odestdf.com.za
MAIL_PASSWORD=fakepasword
MAIL_ENCRYPTION=STARTTLS
I even tried changing the encryption to "tls" but I still see the same error.
Has anyone experienced this before?
EDITED:
Everything was working, but suddenly I see the following error when I see try to send an email:
Expected response code 250 but got code "554", with message "554 5.2.0 STOREDRV.Submission.Exception:SubmissionQuotaE$
" {"exception":"[object] (Swift_TransportException(code: 554): Expected response code 250 but got code \"554\", with message \"554 5.2.0 STOREDRV.Submission.$
\" at /home/forge/owlcrest.co.za/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:457)
Now I am completely confused.
Change the value of MAIL_ENCRYPTION to tls instead of using STARTTLS.
Please also make sure the MAIL_FROM_ADDRESS to your Office365 email address.

"Failed to call HTTP server" error after upgrading SonarQube from 6.0 to 6.7.2

I have upgraded a SonarQube server from 6.0 to 6.7.2. Everything is fine, except that, after logging in as user "admin" and navigating to tab Administration, clicking on subtab System yields an error message
An error has occurred: please contact your administrator.
In file web.log:
2018.03.06 11:38:24 ERROR web[AWH6436/ICo3FeIjAAAz][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info
java.lang.IllegalStateException: Failed to call HTTP server of process [key='ce', ipcIndex=3, logFilenamePrefix=ce]
at org.sonar.ce.http.CeHttpClientImpl.call(CeHttpClientImpl.java:171)
at org.sonar.ce.http.CeHttpClientImpl.retrieveSystemInfo(CeHttpClientImpl.java:60)
at org.sonar.server.platform.ws.StandaloneSystemInfoWriter.write(StandaloneSystemInfoWriter.java:53)
at org.sonar.server.platform.ws.InfoAction.handle(InfoAction.java:64)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
...
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://10.145.61.55
The IP address is that of the server. There is no mention of any port in the error message, I don't know if this has any relation with the error.
It seems that the Web component cannot access the Compute Engine component. However nothing particular was found in file ce.log which ends with a trace Compute Engine is operational.
I followed the short migration guide in https://docs.sonarqube.org/display/SONAR/Upgrading.
Environment: Linux, JDK 8, Oracle DB
Does anyone as a clue? Many thanks in advance.
For whoever who might stumble on the same issue: it was an error in my proxy configuration. Increasing the logging level by setting sonar.log.level=DEBUG in file sonar.properties yielded the following new traces in file web.log:
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#668ee27b5 pairs: {GET http://127.0.0.1:40413/systemInfo HTTP/1.1: null}{User-Agent: SonarQube 6.7.2.37468 # AWHmcYEU8aGLjZ5sPfjj Java/1.8.0_60}{Host: 127.0.0.1:40413}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Proxy-Connection: keep-alive}
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#527214044 pairs: {null: HTTP/1.1 301 Moved Permanently}{Server: BlueCoat-Security-Appliance}{Location: http://10.145.61.55}{Connection: Close}
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] Redirected from http://127.0.0.1:40413/systemInfo to http://10.145.61.55
2018.03.07 11:52:04 ERROR web[AWIAFTpArQRjrTzMAAAg][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info
The proxy was redirecting the Compute engine URL http://127.0.0.1:40413/systemInfo to http://10.145.61.55.
The solution was to add 127.0.0.1 to http.nonProxyHosts in file sonar.properties.

Microsoft EAS Sync Command

My initial request is
POST : /Microsoft-Server-ActiveSync?User=XXXX&DeviceId=XXX&DeviceType=XXX&Cmd=Sync
<?xml version="1.0" encoding="utf-8" ?>
<airsync:Sync xmlns:airsync="AirSync">
<airsync:Collections>
<airsync:Collection>
<airsync:SyncKey>0</airsync:SyncKey>
<airsync:CollectionId>5</airsync:CollectionId>
</airsync:Collection>
</airsync:Collections>
</airsync:Sync>
And i am getting response
<Sync xmlns="AirSync">
<Status xmlns="AirSync">12</Status>
</Sync>
So i am not sure what's wrong with my request. Also i am not able to understand Status = 12.
EDIT :
Okay i found that status 12 means "The folder hierarchy has changed." and needs to perform foldersync command then retry. I did the same but everytime i am getting same response.
In my case i was passing different DeviceId for foldersync & sync request. It was my mistake.

Resources