Skip to main content
Participating Frequently
May 16, 2014
Question

Actionscript runtime error 3769

  • May 16, 2014
  • 5 replies
  • 10274 views

Since updating to 13.0.0.214 we've been getting this error code in one of our applications.  BUT there isn't a description of what it means.  I know what function is throwing it, but without a description, it's going to be hard to fix...

Help!!

This topic has been closed for replies.

5 replies

Participating Frequently
May 21, 2014

The change is heavy-handed. This is a disaster for the community of developers using Flash for enterprise applications - in particular Flex.

Why disabling all headers ?

Chrome/Pepperflash resolved the issue of cross-reference for navigateToURL in a more balanced manner by disabling only the complex headers, but *not* the simple headers, as defined in

http://www.w3.org/TR/cors/#simple-header

***Please read*** the bug report at https://code.google.com/p/chromium/issues/detail?id=351612

Participant
May 21, 2014

My application also uses SWF (AlivePDF )+ Java Servlet to generate PDF/PPT and it was for flash version 13.0.0.6 and not working for 13.0.0.213/214

with below changes i made it work for Flash version 13.0.0.213/214

Flex Change:

Comment the this line :

myPDF.save(Method.REMOTE, "https://myserver.com:8443/pdfService/Weekly_Report?download="+reportType, "Report.pdf");

and add below code to post the pdf data to servlet

var bytesTemp : ByteArray = myPDF.save(Method.LOCAL);

var sendRequest:URLRequest =null;

if(reportType=="ppt"){

sendRequest=new URLRequest("http://myserver:8080/pdfService/GeneratePPT");

}else{

sendRequest=new URLRequest("http://myserver:8080/pdfService/GeneratePDF");

}

sendRequest.method = URLRequestMethod.POST;

sendRequest.data = bytesTemp;

navigateToURL(sendRequest,'_blank');

Java Servlet Code to get generate the PDF:

ServletInputStream si =null;

ServletOutputStream stream = null;

int i = 0;

int k = 0;

int maxLength = request.getContentLength();

byte[] bytes = new byte[maxLength];

si = request.getInputStream();

try{

while (true)

{

k = si.read(bytes,i,maxLength);

i += k;

if (k <= 0)

break;

}

if (bytes != null){

stream = response.getOutputStream();

response.setContentType("application/pdf");

response.setContentLength(bytes.length);

response.setHeader("Content-disposition","inline; filename=scroReport.pdf" );

stream.write(bytes);

stream.flush();

// stream.close();

}

}catch(Exception ex){

// ex.printStackTrace();

}finally {

try{

if (si != null) {

si.close();

}

if (stream != null) {

stream.close();

}

}catch(IOException ex){

}

}

Following code is tested in IE9 /IE8 with Flash version 13.0.0.216

Participant
May 26, 2014

Hello,

I have the same scenario as neelam_Ramesh.

I applied his solution but I cannot get my application working again. Can somebody help me with this please?

Before the new Flash Player everything was working fine in all browser, well at list I tested in FireFox, Chrome, IE 8/9/10/11 in Windows and Safari in Mac.

Now only IE 8 is working witch no very useful since my clients are using most Safari, Chrome and FireFox.

I have my clients and my manager waiting for the solution.

Flex code:

var serverScript:String = tomcatServlet + "setPDF&method=ATTACHMENT&name=routes123456.pdf";

//printPDF.save(Method.REMOTE, serverScript, howToOutput, "routes123456.pdf");

bytesTemp : ByteArray = printPDF.save(Method.LOCAL);

sendRequest:URLRequest = new URLRequest(serverScript);

sendRequest.method = URLRequestMethod.POST;

sendRequest.data = bytesTemp;

navigateToURL(sendRequest,'_blank');

java code:

// ****************************************************

protected void setPDF(HttpServletRequest request,

   HttpServletResponse response) throws ServletException, IOException {

  

  int i = 0;

  int k = 0;

  int maxLength = request.getContentLength();

  byte[] bytes = new byte[maxLength];

  String method = request.getParameter("method");

  String name = request.getParameter("name");

  ServletInputStream si = request.getInputStream();

  while (true) {

   k = si.read(bytes, i, maxLength);

   i += k;

   if (k <= 0) {

    break;

   }

  }

  if (bytes != null) {

   ServletOutputStream stream = response.getOutputStream();

   response.setContentType("application/pdf");

   response.setContentLength(bytes.length);

  //response.setHeader("Content-Disposition", method + ";filename="+ name);

   response.setHeader("Content-Disposition","inline; filename="+ name);

   stream.write(bytes);

   stream.flush();

   stream.close();

  }

}

Thanks !!!

jeromiec83223024
Inspiring
May 27, 2014

If you run the application with the Debugger version of Flash Player, does it provide any useful feedback?

Participating Frequently
May 18, 2014

With 13.0.0.214, it is no longer allowed to send HTTP headers with your request.

This is breaking hundreds of sites.

Please vote here:

https://bugbase.adobe.com/index.cfm?event=bug&id=3759971

jeromiec83223024
Inspiring
May 19, 2014

Unfortunately, this was an intentional and necessary change required to address a security issue reported by an external researcher.  We sincerely apologize for the inconvenience. 

After careful consideration, we found that the only way to truly resolve the issue was to disable support for custom headers in NavigateToURL.

While we would prefer to provide advanced notification for security changes that affect existing content, experience has taught us that it is not a viable approach, and ultimately puts customers at more risk.  We go to great lengths to preserve backward-compatibility in general, but it's our responsibility to balance those considerations with the overall security of end-users and the web at large.

Custom headers continue to be supported via the URLRequest class, and we encourage developers to use those APIs where custom headers are required.

deepsheepAuthor
Participating Frequently
May 20, 2014

Thanks for the feedback, Jeromie.

Are there any examples of how to open in a new window using the URLRequest?

I don't think I NEED the custom headers (still experimenting with it), but I can't seem to get the POST to go through either...

Any idea when the documentation (and examples) will be updated?  It's really a GIANT pain in the butt trying to figure this out without that basic resource.

yossi_on_adobe
Participant
May 16, 2014

I have the same problem it seem that in Flash 13.0.0.214 they have changed something.....

also using AlivePDF

Ned Murphy
Legend
May 16, 2014

This sounds like it is a Flash Player issue and not an Actionscript issue.  You might find help in the Flash Player forum(s) rather than here.

Flash Player

Ned Murphy
Legend
May 16, 2014

If you include the code and the complete error message it might be possible to help solve it.

deepsheepAuthor
Participating Frequently
May 16, 2014

I can include it, but it probably won't help much:


The line of code throwing the error (it's an AlivePDF object):

pdf.save( Method.REMOTE, "http://lamp.countygp.ab.ca/webmap/AlivePdfGen.php", Download.INLINE, "mapexport.pdf","_blank" );

The complete error text from Error.message :Error #3769

If we use veiwer version is 13.0.0.206 it's fine but 13.0.0.214 thows this error.

May 16, 2014

We have a client that is having a similar problem after their users were auto-updated to this version.  We are also using AlivePDF as part of our "Show and Print" functionality and are getting error 3769.

We have some folks here researching, but please share any clues you come across.

SecurityError: Error #3769: Security sandbox violation: Cannot send HTTP headers when using navigateToUrl().

   at global/flash.net::navigateToURL()

   at org.alivepdf.pdf::PDF/save()

   at com.mycompany.module.myaction.components::ReviewConfirm/doPDFPrint()

   at com.mycompany.module.myaction.components::ReviewConfirm/__printButton_click()