exportNetwork with error code #3769

995 views
Skip to first unread message

Joyce Lin

unread,
Jun 4, 2014, 4:47:03 AM6/4/14
to cytoscapew...@googlegroups.com

Hi, i try to use the exportNetwork function previously it worked fine. But now when i try to use it, the error #3769 will pop out. May I know what is the error code referring to? Thank you.

İstemi Bahçeci

unread,
Jun 5, 2014, 6:48:31 AM6/5/14
to cytoscapew...@googlegroups.com


Hi Joyce,

  I have faced this error recently and it seems that it is causing from new flash player sandbox restrictions, as discussed here: http://stackoverflow.com/questions/23703920/flash-sandbox-security-error-just-started-popping-up-in-the-last-day-dead-in-wa if you are building CytoscapeWeb from the sources commenting out the lines that are related to headers in the following method below which is in GraphProxy.as will do the trick i guess:

        /**
         * Send the the network data to a URL.
         */
        public function export(data:Object, url:String, window:String="_self"):void {
            var request:URLRequest = new URLRequest(url);
            //var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
            //request.requestHeaders.push(header);
            request.method = URLRequestMethod.POST;
            request.data = data;
            navigateToURL(request, window);
        }


İstemi Bahçeci


4 Haziran 2014 Çarşamba 11:47:03 UTC+3 tarihinde Joyce Lin yazdı:

Joyce Lin

unread,
Jun 5, 2014, 9:47:47 PM6/5/14
to cytoscapew...@googlegroups.com
Thank you Istemi, I will give it a try. 
Message has been deleted

Ru Jinlong

unread,
Aug 12, 2014, 10:45:30 PM8/12/14
to cytoscapew...@googlegroups.com
Have you solved this issue? I got the same error and don't know how to solve it.

Christian Lopes

unread,
Sep 22, 2014, 4:40:38 PM9/22/14
to cytoscapew...@googlegroups.com
Hi,

I suggest you stop using exportNetwork() and use these functions to get the content you want:



Then use JavaScript/AJAX to post the content to the server.
Or you can save (download) the content using the HTML5 file APIs: http://www.html5rocks.com/en/tutorials/file/filesystem/



Thanks,
Christian

--
You received this message because you are subscribed to the Google Groups "cytoscapeweb-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscapeweb-dis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marek Mutwil

unread,
Nov 25, 2014, 1:12:52 PM11/25/14
to cytoscapew...@googlegroups.com
Hi,
Sorry to bug you about something so basic, but I am a molecular biologist, not a html expert. Still, I need to get this thing running.
I have managed to get the cytoscape web working (e.g. http://aranet.mpimp-golm.mpg.de/responder.py?name=gene!ath!1), but I am also facing the 3769 error.
How exactly should I use the pdf() and what should the server-side script look like?  

Here is the function that I use for sending the network to my .py script (it was working before):

Coex.addContextMenuItem("EXPORT: as pdf", "network", //pdf()

Here is the server-side script sending it to users:

if formatOf=="pdf":
    print "Content-Type:application/octet-stream;";
    print "Content-Disposition: attachment; filename=\"%s.pdf\"\r\n\n" % (pfamOf); 
    print data

Please let me know how to solve this. I am going slowly crazy here.
Cheers,
Marek

Marek Mutwil

unread,
Nov 28, 2014, 4:29:59 PM11/28/14
to cytoscapew...@googlegroups.com
I got a solution after bugging a web-developer for 3 days: 

Coex.addContextMenuItem("EXPORT: as pf", "network", 
function (evt) {
        var netta = Coex.pdf();
contentType = 'application/octet-stream';
var a = document.createElement('a');
var blob = new Blob([window.atob(netta)], {'type':contentType, });
a.href = window.URL.createObjectURL(blob);
a.download = 'network.pdf';
a.click();
});

Marcelo Junior Carvalho

unread,
Mar 11, 2015, 4:15:08 PM3/11/15
to cytoscapew...@googlegroups.com
Hi there,

can you provide details on how exactly did you solve it?
I´m using the mini version.

Jia Wang

unread,
May 21, 2016, 7:58:09 AM5/21/16
to cytoscapeweb-discuss
Thanks Marek, I got the same error and solved it follow your solution.

My code:

  function fixBinary (bin) {
    var length = bin.length;
    var buf = new ArrayBuffer(length);
    var arr = new Uint8Array(buf);
    for (var i = 0; i < length; i++) {
      arr[i] = bin.charCodeAt(i);
    }
    return buf;
  }

$("#doexport").click(function(){
  var type = $("#exporttypes").val();
  var blob = "";

  var a = document.createElement('a');
  contentType = 'application/octet-stream';
  if ( type == 'png' ){
        var png = vis.png();
        var binary = fixBinary(atob(png));
        blob = new Blob([binary], {type: 'image/png'});
  }
  else if ( type == "pdf" ) {
        var pdf = vis.pdf();
        blob = new Blob([window.atob(pdf)], {'type':contentType, });
  }
  else{
        var FileContent = "";
        if ( type == "svg" ){
                FileContent = vis.svg();
        }
        else if ( type == "xgmml" ){
                FileContent = vis.xgmml();
        }
        else if ( type == "sif" ){
                FileContent = vis.sif();
        }
        else{
                FileContent = vis.graphml();
        }
        blob = new Blob([FileContent], {'type':contentType, });
  }
  a.href = window.URL.createObjectURL(blob);
  a.download = 'network.'+type;
  a.click();
});

Marek Mutwil於 2014年11月29日星期六 UTC+8上午5時29分59秒寫道:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages