Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormData.appendBlob throws "Exception: String expected" #19238

Closed
DartBot opened this issue Jun 5, 2014 · 11 comments
Closed

FormData.appendBlob throws "Exception: String expected" #19238

DartBot opened this issue Jun 5, 2014 · 11 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2014

This issue was originally filed by jirkad...@gmail.com


Taking the test from https://github.com/dart-lang/bleeding_edge/blob/master/dart/tests/html/form_data_test.dart and running the 'appendBlob' code fails with an exception.

test_appendBlob () {
        var form = new FormData();
        var blob = new Blob(
            ['Indescribable... Indestructible! Nothing can stop it!'],
            'text/plain');
        form.appendBlob('theBlob', blob, 'theBlob.txt');
}

main() {
  print(FormData.supported);
  test_appendBlob();
}

What is the expected output?
true

What do you see instead?
true
Exception: String expected

In Dartium, enter chrome://version and paste the results here.

Chromium 36.0.1985.0 (Developer Build 272160)
OS Linux
Blink 537.36 (@­173750)
JavaScript V8 3.26.31
Dart 1.5.0-dev.3.4
Flash (Disabled)
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.0 (Dart) Safari/537.36
Command Line /home/jirka/Bin/dart/chromium/chrome --remote-debugging-port=58231 --user-data-dir=/home/jirka/.dartium --enable-experimental-web-platform-features --enable-html-imports --no-first-run --no-default-browser-check --no-process-singleton-dialog --flag-switches-begin --enable-nacl --flag-switches-end chrome://version/
Executable Path /home/jirka/Bin/dart/chromium/chrome
Profile Path /home/jirka/.dartium/Default
Variations 24dca50e-7ffa59d
ca65a9fe-91ac3782
5e29d81-f23d1dea
246fb659-92bb99a9
f296190c-b52e3392
4442aae2-a5822863
ed1d377-e1cc0f14
75f0f0a0-d7f6b13c
e2b18481-9d9eea77
e7e71889-4ad60575

Put OS and machine details here.
(If you're using Linux or Mac OS, you can get this from uname -a.)
Linux arch 3.14.4-1-ARCH #­1 SMP PREEMPT Tue May 13 16:41:39 CEST 2014 x86_64 GNU/Linux

Please provide any additional information below.

After updating and running on the newest SDK (details below), it prints

true
<debug target crashed>
Breaking on exception: String expected

and Dartium crashes

Dart Editor version 1.5.0.dev_04_00 (DEV)
Dart SDK version 1.5.0-dev.4.0

Dartium version seems to be unchanged after the update:

Chromium 36.0.1985.0 (Developer Build 272160)
OS Linux
Blink 537.36 (@­173750)
JavaScript V8 3.26.31
Dart 1.5.0-dev.4.0
Flash (Disabled)
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.0 (Dart) Safari/537.36
Command Line /home/jirka/Bin/dart/chromium/chrome --remote-debugging-port=41788 --user-data-dir=/home/jirka/.dartium --enable-experimental-web-platform-features --enable-html-imports --no-first-run --no-default-browser-check --no-process-singleton-dialog --flag-switches-begin --enable-nacl --flag-switches-end chrome://version/
Executable Path /home/jirka/Bin/dart/chromium/chrome
Profile Path /home/jirka/.dartium/Default
Variations 24dca50e-837c4893
ca65a9fe-91ac3782
5e29d81-f23d1dea
246fb659-7564fb06
f296190c-b52e3392
4442aae2-a5822863
ed1d377-e1cc0f14
75f0f0a0-d7f6b13c
e2b18481-9d9eea77
e7e71889-4ad60575

@DartBot
Copy link
Author

DartBot commented Jun 26, 2014

This comment was originally written by jimmysh...@gmail.com


it seems a chromium issue
chromium 34 works fine
chromium 36 doesn't work

@DartBot
Copy link
Author

DartBot commented Jun 26, 2014

This comment was originally written by off...@mikemitterer.at


Same here. Chromium: Version 36.0.1985.67 (277752) (Mac)

Here is my Stacktrace - maybe it helps:

String Expected

STACKTRACE:
#­0 Native_FormData_appendBlob_Callback (dart:_blink:2051)
#­1 FormData.appendBlob (dart:html:13497)
#­2 UploadServiceImpl.sendFile (package:webapp_base_ui/angular/services/UploadServiceImpl.dart:104:28)
#­3 UploadComponent._onFilesSelected (package:webapp_base_ui/mm_uia_upload/mm_uia_upload.dart:145:36)
#­4 UploadComponent.handleFileInput

@vsmenon
Copy link
Member

vsmenon commented Jun 26, 2014

Leaf - looks like a type check issue in the new bindings code. Can you take a look?


Set owner to @leafpetersen.
Added this to the 1.6 milestone.

@leafpetersen
Copy link
Member

It looks like we used to map this to two different custom implementations, and we're now (with the new scripts) mapping appendBlob to the append custom implementation which isn't set up to handle blobs. I'll look into it.


Added Started label.

@leafpetersen
Copy link
Member

Fix under review here: https://codereview.chromium.org/358823004 .

@vsmenon
Copy link
Member

vsmenon commented Jun 30, 2014

Leaf's fix is in. Will cherry pick to 1.5 branch.


Set owner to @vsmenon.
Removed this from the 1.6 milestone.
Added this to the 1.5 milestone.
Added Accepted label.

@kasperl
Copy link

kasperl commented Jul 1, 2014

Removed Priority-Unassigned label.
Added Priority-High label.

@vsmenon
Copy link
Member

vsmenon commented Jul 2, 2014

Leaf's fix is landed and merge request filed:
https://code.google.com/p/dart/issues/detail?id=19783


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jul 3, 2014

This comment was originally written by @a14n


I still see this issue in the 1.5.2 release shipped today. Is this version supposed to contain the fix ?

@vsmenon
Copy link
Member

vsmenon commented Jul 3, 2014

I don't think so - I believe 1.5.3.

@vsmenon
Copy link
Member

vsmenon commented Jul 3, 2014

Which is cooking here: http://gsdview.appspot.com/dart-archive/channels/stable/raw/37972/

Doesn't look like windows is there yet.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Jul 3, 2014
@DartBot DartBot added this to the 1.5 milestone Jul 3, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

4 participants