Calling getAttachmentContentAsync on an email left open for more than 5 minutes results in a 401 error - outlook-addin

Steps to reproduce:
1. Open Add-in on an email item with attachments (OWA against O365 on Chrome)
2. Wait > 5 or so minutes
3. Attempt to download attachment content using getAttachmentContentAsync
4. Observe callback with generic error
Looking at outbound XHR's in dev console. I see a GET to this url below
https://attachments.office.net/owa/jules.wada#sfdcmsft.com/service.svc/s/GetFileAttachment?id={attachmentId}&token={attachmentDownloadToken}&isDownload=true&animation=true&asDataUri=true
This requests 302's with a redirect url of (It looks like office.js is attempting to refresh the attachmentDownloadToken)
https://outlook.office.com/owa/jules.wada#sfdcmsft.com/service.svc/s/GetAttachmentDownloadToken?redirect={encodedRedirectParams}
which then returns a 401. Is this behavior expected?
Switching between emails refreshes the attachmentDownloadToken, but getAttachmentContentAsync does not seem to do so.

Related

Why does my automated Blue Prism process fail in some stages in scheduler-mode, when these steps work totally fine in debug-mode?

For example I implemented a stage "Activate Application" that works in debug mode perfectly, but fails when I use schedule-mode or when I simply drag and drop the process on a runtime resource.
A second example that fails: I implemented an action called "Navigate to URL". These action sets the URL from the input variable In_URL firstly in the URL bar in browser Google Chrome. Then the URL bar is focused and the enter button is hit in the last stage.
In schedule mode the following error appeared:
ERROR: Internal : Failed to perform step 1 in Navigate Stage 'Click URL Field' on page 'Navigate to URL' - Could not identify process owning the current foreground window
Actually there is only one Google Chrome window, so I don't understand why it says these error message.
These issues are typically due to either Windows being locked, or using RDP to connect to the resources (RDP does not work well with Blue Prism). In both cases, the desktop will not be active, so any active accessibility or region elements will fail.

Open specific conversation on whatsapp from ionic 4

I have tried to call whatsapp from InAppBrowser plugin by passing url "https://api.whatsapp.com/send?phone=+91123456890&text=test".
I have also added config.xml changes as suggested
(access launch-external="yes" origin="whatsapp:*" /)
It opens the browser (when I run this on device) with send button on it to send the message to Whatsapp.
But I am unable to tap the Send button. It is not redirecting me to whatsapp application with given number.
Please can you show me some sample code or the way to achieve this.
Thanks,
i also face this problem. following code fixed my problem
window.open('whatsapp://send?phone=923130601266', '_system');
You should try to call below api in InAppBrowser.
The direct conversation will open with the number you set below the link.
Don't forget to add country code before number.
https://wa.me/your-mobile-number

How to handle authorization code requests in react-native?

I have a case where server could respond with error if authorization code is required (for example code from Google Authenticator) and I can't find a solution on how to handle that.
Scenario: Request to server > server responds with error > enter code > re-send request with added code in body
If I understand your question correctly, I would do it this way:
Send request to server >
Receive error and open another window, which will contain the text box for the code >
User fills it out and sends it >
Then if it was successful, display a message or navigate to another screen.
If this isn't the answer you are looking for then please specify your question more clearly...

Web POS cancel results in undefined URL

I have build a web application which runs in the browser on an Android device. The URL to launch the square POS app is as follows:
intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.com.squareup.pos.WEB_CALLBACK_URI="+callbackUrl+";S.com.squareup.pos.CLIENT_ID="+clientId+";S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=100;S.com.squareup.pos.CURRENCY_CODE=AUD;S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD;S.com.squareup.pos.NOTE="+orderId+";S.com.squareup.pos.REQUEST_METADATA="+orderId+";l.com.squareup.pos.AUTO_RETURN_TIMEOUT_MS=3200;end
The square POS app launches as expected. I can process a payment through the POS app and upon a successful transaction it switches to the browser and loads the callback url. This is all working well.
However, if I click on the link above to open the square POS app and then hit the cancel [x] button in the square POS app it bumps back to the browser and then reloads the URL with an undefined parameter.
E.g. the original URL is https://localhost:1337/admin/#/order/pay/f2kw0oFYNG
Then I launch the square POS app via the intent url. When if I hit cancel in the square POS app, when it switches to the browser it loads:
https://localhost:1337/admin/#/order/pay/undefined
Although you answered it yourself in the comments, it looks like the issues was the result of having a cached version of your link being used.
Just for clarity for anyone coming across this:
The callback URL should always be called at the end of the transaction.
For example: A cancelled transaction would return http://URL/PATH?com.squareup.pos.ERROR_CODE=com.squareup.pos.ERROR_TRANSACTION_CANCELED&com.squareup.pos.ERROR_DESCRIPTION=The%20transaction%20was%20canceled if the merchant had cancelled the transaction.

Request ID is not available when App Launches after clicking Facebook notification

A Facebook app is setup with iOS native app enabled with bundle id and App Store Id of another app.
Following are possible in the current scenario.
1.Sending an app request to a friend,
2.The request badge appears in the friend's Facebook,
3. And clicking on the request launches my app.
This was the link i referred to implement this.
https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/#protip3
I am supposed to get a NSURL from these functions
– application:openURL:sourceApplication:annotation:
OR
– application:handleOpenURL:
and the expected format is as follows.
fb[APP_ID]://authorize#expires_in=[ACCESS_TOKEN_EXPIRATION]
&access_token=[USER_ACCESS_TOKEN]
&target_url=https://apps.facebook.com/[APP_NAME_SPACE]/?request_ids=
[COMMA_SEPARATED_REQUESTIDs]&ref=notif&app_request_type=user_to_user
Here the request_ids contains The id of app request send, and which can be used to get the data attached to the App Request.
Now my issue is that, I am not getting the NSURL in expected form, instead I get the following format. So I am unable to find or use the request_ids.
fb[APP_ID]://authorize#expires_in=[ACCESS_TOKEN_EXPIRATION]
&access_token=[USER_ACCESS_TOKEN]
&target_url=https://apps.facebook.com/application.php?id=442634372448098