Outlook for mac - Office.context.mailbox.item.body.prependAsync() does work on current UI - outlook

I've been trying to understand why body.prependAsync() does not work only on Outlook for Mac (current UI with Microsoft365 Subscription). For all other browsers and Outlook for Mac (new UI with Microsoft365 Subscription), it is working perfectly; meaning the body of the email is being populated correctly. The API version being used is 1.7 and I can see that it's supported in this documentation.
The error that I'm receiving in the callback from body.prependAsync() is:
[2006] Invalid Format Error : The format of the specified data object is not valid.
In the error code documention, I see that this error could be caused by the following: The solution developer supplies an invalid HTML or OOXML string, a malformed HTML string, or an invalid OOXML string.
However, the body message needing to be displayed is a properly formatted HTML. I've even tried a regular string but still getting the same error.
The way I am calling it:
Office.context.mailbox.item.body.prependAsync(
'test',
{coercionType: Office.CoercionType.Html},
callback
)
Any advice is greatly appreciated. Thanks!

Related

Cant figure out, why i get a 403

i try to setup the youtube api but i get a 403.
I tried to setup several times- without success.
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&id=-DIJvggBrg8&key=xyz
Maybe someone is able to help me or even login to the console for a setup?
The 403 error by itself is not of immediate use. Its attached error code (as I already pointed out above) sheds light on the things that happened.
The API responds to any query you make with a text (that is structured in JSON format). That response text contains the needed error code.
I suggest you to proceed with the following steps:
delete the old API key (right now it is still accessible!);
create a new API key and
run your API query using the new key and then post here the API response text.
Note that I checked the video -DIJvggBrg8 to which your query refers to with my own API key and got no error but a JSON text describing the video.

Chromecast sample sender application CastHelloText-chrome ends with error when trying to get session

I have problem with launching Google-Cast application similar to sample CastHelloText-chrome. I slightly modified example code for my specific purposes. The goal for creating this application is to send and show image data directly in Chromecast device.
Particularly the difference between official sample and my code is in message format and its content, sent by sender application. Sender application took png image coded by base64 and send through message bus with custom namespace. Receiver application get this message and use this as data source for html object <img>.
Error appears when I do this steps:
Reload sender page, checking console if any device found.
Send the form by just pushing enter on input box (text is ignored).
Now a popup from Chromecast extension shows. Next there are two scenarios:
3a) I confirm casting to device by choosing one from the list, then I get this error message in console:
onError: {"code":"channel_error","description":"Error: Timeout","details":null}
3b) I just click somewhere else, I get this error:
onError: {"code":"cancel","description":"User closed popup menu","details":null}
Both of errors are caused by calling function chrome.cast.requestSession in chromehellotext.html at line 161, but what's really wrong I don't know.
When I step sender script I realize that function sessionListener is never called. I know that something go wrong when code try to call chrome.cast.requestSession, where described error raises. So I need help if I missed about right way to use Google-Cast API or If this problem has something to do with networking issues.
Receiver application is registered on Google Cast SDK Developer Console and I'm testing on registered device with some serial number. I'm using Google Chrome in version 42.0.2300.2 canary (64-bit) and Chrome version 40.0.2214.111 (current stable I suppose). For testing I also tried to turn off Windows Firewall entirely but with no luck.
Edit:
There were some syntactic errors that caused error message described above.
It seems like you are trying to use the data/control channel to send an image; please don't do that; that channel is not meant to be used for large data communications; in fact it cannot send anything which approaches or exceeds 64k. If your goal is to send images from your local machine, you would need to run a local web server on your local machine and serve images through the web server.
For and easiest tutorial you can have a look to this tutorial.
It is well explained in this tutorial.
Chromecast Sender application
There is no need to maintain session by yourself.
just add button and enjoy casting
mCastManager.addMediaRouterButton(mediaRoutebtn);
I found a source of my problem. There was something wrong in receiver code - syntactic and runtime errors, so I must admit that my code wasn't functional. Now its working in terms of launching application and getting session.
Unfortunate thing is that the error message generated by Chromecast extension didn't match the actual error - at least it was a bit confusing when I didn't know what's really happening on receiver side without ability to debug the code.

Causes for HttpDelete header field 'x-method' missing error

Please help me understand the possible causes of an 'x-method' missing error when using HttpDelete.
There is a Windows 7 user using Chrome 23 but HttpDelete isn't working. This test website http://www.mnot.net/javascript/xmlhttprequest/ reports the following for the "What Methods Are Available?" section:
DELETE: fail (Test execution problem: expected response header field ('x-method') missing.)
The machine also fails to use DELETE when using a custom web application accessing a REST service using jQuery ajax. It reports a 405 exception for any DELETE requests. The application works fine for other machines with the exact same actions.
Information about what could cause the delete verb to fail under these circumstances is appreciated.

Ported Chrome extension to Firefox not working (indexedDB error)

I'm trying to port the Twitter Notifier extension to FF.
I'm not too familiar with JavaScript so I just used extension factory to convert it to FF.
Unfortunately it is not working; I don't get any HTML5 desktop notifications.
I've looked at the code a bit and I think the problem is with twitter.js which should be found in the path 'resources\extension-data\js'.
http://pastebin.com/C0NqU4Ur
First I've changed
twitter.messagesDB = window.webkitIndexedDB.open("messagesDB");
to
twitter.messagesDB = window.mozIndexedDB.open("messagesDB");
but it still is not working.
The error console also doesn't show any error.
When I put a console.log command to the twitter.messagesDB.onsuccess function nothing is being outputted to the error console.
Also no output when I create an onerror function.
So I though to surround the functions with a try and catch clause but no error is being thrown.
So I tried to put twitter.messagesDB = twitter.messagesDB.result; out of the function and the following error shows up in the error console:
Error: uncaught exception: [Exception... "A mutation operation was attempted on a database that did not allow mutations." code: "6" nsresult: "0x80660006 (NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR)" location: "chrome-extension://gjlehiopfilnaggndcmbhphaglkbkekf/js/twitter.js Line: 28"]
What does that mean?
How can I make it work in Firefox?
Thanks in advance!
Edit: I'm using Firefox 12 on Windows
This is due to an incompatibility between the Firefox implementation of IndexedDB, which supports the latest IndedexDB protocol published December 2011, and the Chrome implementation, which supports the version previous to that.
The breaking change is how databases are created, where the older (Chrome) implementation uses the setVersion transaction whereas the newer version (FF) uses an onupgradeneeded event and callback.
To see this change, please star this issue.

invalid encoding when uploading an image to rails using javascript

I'm using qqfileupload (http://valums.com/ajax-upload/) to create a single drag & drop image upload interface.
The request is being sent to rails, and my rails console is returning
!! Unexpected error while processing request: invalid %-encoding (����JFIFdd��Ducky��Adobed)
which I assume is rails attempting to read the file.
I set my controller to output
return render :text => params
thinking that I could look at what the server was recieving, but I only get the Unexpected error again, which to me says that Rails is hitting this error before getting to the controller.
The params from the javascript console shows
http://localhost:3000/users?qqfile=me.jpg&first_name=&last_name=
the first and last fields are supposed to be blanks.
I stared following this tutorial http://css-tricks.com/ajax-image-uploading/, which looked very similar to the case I was already using, and it lead to this download script http://valums.com/ajax-upload/, which is almost identical to the one I had before, but somehow is slightly different and doesn't return the error above.
Hopefully this helps somebody out.

Resources