TimestampParserError: unhandled timestamp format #4081
Replies: 14 comments
-
I forgot to mention that the device where the bug is happening is an iPhone 5S running iOS 12.4.8 so it's old but that doesn't explain the strangeness of the bug where the date has the first character missing, causing an error that means it can't get objects from S3. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey @chrisradek thanks for opening this issue, I am a little confused, how is the |
Beta Was this translation helpful? Give feedback.
-
I would be happy to take or make a PR once I understand the case better. |
Beta Was this translation helpful? Give feedback.
-
Hi @ajredniwja the Note that I'm not doing anything abnormal. I'm simply using s3's Please let me know if you need more clarification. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@chrisradek, thanks for the clarification, my only concern that we should actually look into why there is a missing character there, since it works well with the browser and Cordova app on Android. I have looked at your code which seems to be the right solution for your use case. The correct fix would be to fix the root case and not customize the SDK according to an use case. |
Beta Was this translation helpful? Give feedback.
-
@ajredniwja Agreed! |
Beta Was this translation helpful? Give feedback.
-
Since it is not an issue with the SDK, I would like to close the issue, please reach out if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
@ajredniwja Are you sure it's not? All I know is that the first character is being removed at some point. It's either an issue with AWS server side or it's somewhere in the SDK. It needs to be investigated rather than assumed to not be an issue with the SDK imo. |
Beta Was this translation helpful? Give feedback.
-
@ajredniwja The exact same bug just happened to one of my users so it's definitely not limited to just my test device (not that I ever thought it was). Can someone from AWS please investigate? |
Beta Was this translation helpful? Give feedback.
-
I can investigate this further but it wasn't my assumption that the SDK is not at fault here. I did run some tests, I can share my findings once I redo them. |
Beta Was this translation helpful? Give feedback.
-
@ajredniwja Just to let you know, the user experienced the bug on an iPad Mini but unfortunately they weren't able to tell me what version of iOS it happened on as they upgraded between seeing the bug and me asking. Happy new year :) |
Beta Was this translation helpful? Give feedback.
-
I just came across this same issue and, using the same added else case, the issue was fixed. This is happening on iOS Cordova as well, with an iPhone 12 mini on 14.7.1. I only noticed this come up after adding this cordova plugin. @chriswardo, do you know if you're using this as well? |
Beta Was this translation helpful? Give feedback.
-
@fiveironfrnzy08 Sorry I've only just noticed your comment. I'm not using that plugin, no. I'm glad someone else is experiencing the same bug, so it doesn't look like I'm mad ;) |
Beta Was this translation helpful? Give feedback.
-
I've created an AWS Lambda function to convert images to webp format (Triggered by CloudFront) and I am getting same error:
Piece of the code which is triggering this error:
After investigation, I've found out that the issue was that the object in S3 (the one I was trying to fetch), had a System-defined metadata: |
Beta Was this translation helpful? Give feedback.
-
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
Using s3's
getObject
orheadObject
functions on a valid file, it gives the error"TimestampParserError: unhandled timestamp format: un, 04 Oct 2020 12:29:09 GMT"
. Note that "un" isn't a typo and is the reason for the error judging by the source code of parseTimestamp in the SDK. The first character is somehow missing from the rfc822 date format.The error happens only on iOS in a Cordova app. The exact same code (and same file) works in browsers (in a React project) and the Cordova app on Android. It even works in Safari on the same iPhone.
I've managed to get it working by adding an additional case to the
parseTimestamp
function in util.js:Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
No
Details of the browser/Node.js version
v14.2.0
SDK version number
2.766.0
Beta Was this translation helpful? Give feedback.
All reactions