-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use FES /account/feedback endpoint #2827
Comments
Hi @DenBond7, mentioned functionality was deployed to |
I've tried to migrate but I caught errors
@sosnovsky @martgil Please check my logs. Have I missed something? |
Hello @DenBond7 - I'll check it in a second and get back to you. |
Feedback endpoint is disabled for |
@martgil Please also check this error
it looks like I can't send feedback with a screenshot |
@DenBond7, were you able to share the HTTP request as well? |
Got it, I'll just do several tests with the current implementation we have on the Production android app and try to compare them. I'll get back to you as soon as possible. |
Hi @DenBond7 - I did my testing and investigation and i found out that, it directly base64 decodes the passed value of the screenshot. However, the screenshot base64 data is segmented by newlines In comparison, seems like the port we have in the Enterprise Server [ES] does not have that and directly base64decodes it: https://github.com/FlowCrypt/enterprise-server/blob/3e1626ee3496b2929b11a070f7906892524ff6b6/fes-lib/src/main/kotlin/com/flowcrypt/fes/server/handlers/api/feedback/AccountFeedbackPost.kt#L71 I also manually decodes the images to ensure I have the right information to share: We should've fix the issue on the ES codebase. cc @sosnovsky |
Thank you, Mart!
It helped me. When I change my code to use The following changes work well val screenShotBase64 =
Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.NO_WRAP) |
Got it. Should I switch to use val screenShotBase64 =
Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.NO_WRAP) or should I leave things as-is and wait for the server changes? |
I haven't checked the result if the app base64 the screenshot with val screenShotBase64 =
Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.NO_WRAP)` I'll be checking that right now, if its ok? If not, then I'll also check if adopting the ES base64 decoding with code from https://github.com/FlowCrypt/enterprise-server/blob/3e1626ee3496b2929b11a070f7906892524ff6b6/fes-lib/src/main/kotlin/com/flowcrypt/fes/server/handlers/api/feedback/AccountFeedbackPost.kt#L71 will let us achieve our goal. |
Hi @DenBond7, I have answer to your question now. I checked your PR here #2920 and it is generating correct base64 image too. Additionally, I tested to send the same base64 image against old api in This make me think that its the ES that needs to updated. I have tried to diff two screenshots generated given the request is exactly the same and sent on two different APIs. 1-good.png is the result from |
I have further test the ES server side and when doing file writing, I'm able to save and open the base64 file and it turns out to be decoded very well where the data encoded came from #2920 as I manually tested it: One thing left is that, then uploading it and putting it as an attachment, its file size noticiably changed from 65590 to 61494 considering im sending the same exact base64 screenshot... Does that mean there's some problem with the upload? |
Hi @martgil, If I understand you correctly, we have |
For feedback messages we need to migrate from deprecated https://flowcrypt.com/api/help/feedback endpoint to the newer
shared-tenant-fes/api/v1/account/feedback
endpoint.flowcrypt-android/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/RetrofitApiServiceInterface.kt
Line 63 in f3cf428
Should be done after https://github.com/FlowCrypt/enterprise-server/issues/6123 is implemented and deployed
The text was updated successfully, but these errors were encountered: