Firebase email trigger extension: can't attach pdf file - firebase

I'm using the firebase email trigger extension to send an email with pdf attachment.
but mo matter what I do and how I send the file, I'm always get this error:
Unhandled error {
Error: 3 INVALID_ARGUMENT: Property attachments contains an invalid nested entity.
note: 'Exception occurred in retry method that was not classified as transient'
}
I'm trying to send the pdf as text (or encoded text) and not upload the file to some storage and then just send the url.

The problem was the size of the file (more than 2mb of encoded content)

Related

Extracting headers of msg outlook emails exported from "Sent folder" using msgxtractr package in R

Using the msgxtractr package on R, I am trying to extract the headers of outlook emails with the format ".msg". The codes used are:
path = "C:/Users/.../email_for_extracting.msg"
library(msgxtractr)
email = read_msg(path)
email_header = email$headers
However, I notice that I am only able to do so if the email is located in the "Inbox" folder of my Outlook in the first place, and thereafter exported as a msg file. If the email is saved from the "Sent" folder, then email_header will be NULL.
Is there a way to extract the headers of emails located in the "Sent" folder of my Outlook? Thank you!
Sent messages do not have the PR_TRANSPORT_MESSAGE_HEADERS MAPI property - it is only present on received messages when Outlook parses incoming messages and extracts the MIME headers. Sent messages might not even be converted to MIME, e.g. when sending between two Exchange mailboxes. Take a look at the messages with OutlookSpy (I am its author) - click IMessage button to see the available MAPI properties.

Unable to connect R with Youtube API

I am trying to connect with the youtube API using yt_oauth function but getting error as follows :
Error in readRDS(token) : error reading from connection.
I have checked my application several times. First I got the API Key and then the Client ID and Client Secret. I am using the Client ID and Client Secret for app_id and app_secret below. I have enabled all the 3 youtube APIs(Data,Analytics,Reporting)So where can I be going wrong? Any help appreciated.
Below is the code I am using
library("tuber")
app_id <- "XYZ"
app_secret<-"abc"
yt_oauth(app_id,app_secret)
Seems that you called yt_oauth previously with some invalid parameter. A file called .httr-oauth may exists at your current path (in my case it was on My Documents folder). One can remove that file or alternatively do this:
yt_oauth(app_id, app_secret, token = '')
It will force tuber to refresh the token state.

use of unconstructed message in an orchestration

I have this problem that I hope someone can help solve.
I have an orchestration that as input receive a file (message as Microsoft.XLANGs.BaseTypes.Any). Just a file with some unstructured text.
I have created a Dynamic send port that save the received file in a backup folder.
The issue is that when someone send the same file (with the same filename), it doesn't overwrite the file in the backup folder.
when a try this following in a constructMessage shape
Message_new = orgMessage;
Message_new(FILE.CopyMode)= 2; //2=overwrite,
Both message are of same type: Microsoft.XLANGs.BaseTypes.Any
I'm getting this error:
Error 1 use of unconstructed message 'orgMessage'
'': message has not been initialized in
The error you got is not linked to the dynamic port neither the copy mode.
You are trying to assign to your message named "NewMessage" a message that is not constructed neither received in the orchestration.
Please check that the message named "orgMessage" is a message that was received via a receive shape or if it is constructed before your message assignment.

Sending a POST request using Balkan's requests lib with data and files (Robot Framework)

I'm trying to send a request (post) using Balkan's requests library from test case written in Robot Framework http://bulkan.github.io/robotframework-requests/#Post with two parameters as a data and a file. Unfortunatelly, all the time I have the same error like described below.
My Test Case:
X_T_Should Upload File Correctly And Get HTTP 200
Send Default File To SUT And Return Response
*** Keywords ***
Send Default File To SUT And Return Response
[Arguments] ${user_login}=${USER_LOGIN} ${user_password}=${USER_PASSWORD}
${url}= Get URL
${auth}= Create List ${user_login} ${user_password}
Create Session rm ${url} auth=${auth}
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
&{data}= Create Dictionary name=file filename=${DEFAULT_FILE_NAME}
${file_data}= Get Binary File ${CURDIR}${/}Resources${/}${DEFAULT_FILE_NAME}
&{files}= Create Dictionary file=${file_data}
${resp}= Post Request rm ${UPLOAD_URI} files=${files} data=${data} headers=${headers}
Delete All Sessions
Error (from Robot Framework):
20160525 09:47:10.645 : FAIL : ValueError: Data must not be a string.
The problem is with the keyword Post Request. When I do not set an argument files or data that everything is well but if I set both args. that I see these strange error.
It is a bug in library?
According to the documentation, the files parameter is a list of file names. You are passing the actual file contents into the keyword. This might explain why you are getting "Data must not be a string".
We've encountered this exception also. The exception seems to be raised in Requests Python library.
At line 119 of requests/models.py,
elif isinstance(data, basestring)
checks whether data is a string. And robotframework-requests seems to be casting data into a string almost always. There is an issue for robotframework-requests regarding the exception.

Error while Uploading file for API in apigee

I have an existing API proxy in Apigee edge. When I am trying to edit and save any policy I am getting below error.
Error while Uploading file for API <api name>.
org.apache.xerces.dom.ElementNSImpl cannot be cast to com.apigee.messaging.config.beans.TargetConnection
I am not able to figureout how to resolve this.
Thanks in advance.
When you get an error message like 'cannot be cast to...' that suggests that the field is expecting a certain type (message type in your case, like a request object or response object).
Try ensuring that the variable you enter into that particular field is a message type. It may be that the variable you are using is only a subset of a whole message.

Resources