Skip to content
This repository has been archived by the owner. It is now read-only.

Polymer Dart project with sub folders stopped working #41

Closed
tomas259 opened this Issue Mar 21, 2015 · 10 comments

Comments

3 participants
@tomas259
Copy link

commented Mar 21, 2015

After upgrading on the 12th of march dart projects with subfolders does not run.

The following output in the console occurs after hitting run in the dart editor:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/interface%5Ct_file.dart An error occurred loading file: http://localhost:8080/interface%5Ct_file.dart

-one for each of my polymer templates (like t_file.dart), which are in folder "web/interface".
After hours trying to fix it, I created a new polymer app from scratch. I create a template called t_file. It works fine when t_file is in folder web, but if I restructure and move t_file to subfolder web/interface, I cannot get the progam to run. There are no complaints in the editor, but I get the above error on running. A blank webpage appears.

Is the replacement of the slash character to %5C expected? Is that the problem?

after adding the below to yaml everything runs fine.
code_transformers: '<= 0.2.5'
polymer: '<= 0.15.5+4'

reports on stackoverflow of the same issue:
http://stackoverflow.com/questions/28975203/dart-editor-how-to-use-sub-folders

@jakemac53

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2015

Can you please try this again, and if its still failing post a repro? There have been a few bug fixes related to similar things so it may be working now, it definitely works in general with a simple app in a sub-folder.

@tomas234

This comment has been minimized.

Copy link

commented Mar 25, 2015

I can still reproduce this in the latest dart polymer (0.16.0+7)

  1. create a new poject in dart editor (1.9.0.dev_10_13), select polymer web app project

  2. change pubspec.yaml
    polymer: any
    paper_elements: any

  3. add a subdirectory

  4. add testcom.dart:
    import 'package:polymer/polymer.dart';
    @CustomTag('test-com')
    class app extends PolymerElement {
    app.created() : super.created()
    {
    }
    }

  5. add testcom.html

<script type="application/dart" src="testcom.dart"></script>
  1. Run the project and get the result
    Failed to load resource: the server responded with a status of 404 (Not Found)
    http://localhost:8080/subdir%5Ctestcom.dart
    An error occurred loading file: http://localhost:8080/subdir%5Ctestcom.dart

I'm on windows7.

Here's my pubspec lock.

Generated by pub

See http://pub.dartlang.org/doc/glossary.html#lockfile

packages:
analyzer:
description: analyzer
source: hosted
version: "0.24.0"
args:
description: args
source: hosted
version: "0.12.2+6"
barback:
description: barback
source: hosted
version: "0.15.2+4"
browser:
description: browser
source: hosted
version: "0.10.0+2"
cli_util:
description: cli_util
source: hosted
version: "0.0.1+1"
code_transformers:
description: code_transformers
source: hosted
version: "0.2.7+1"
collection:
description: collection
source: hosted
version: "1.1.0"
core_elements:
description: core_elements
source: hosted
version: "0.6.1+2"
csslib:
description: csslib
source: hosted
version: "0.11.0+4"
custom_element_apigen:
description: custom_element_apigen
source: hosted
version: "0.1.4+2"
dart_style:
description: dart_style
source: hosted
version: "0.1.7"
glob:
description: glob
source: hosted
version: "1.0.4"
html:
description: html
source: hosted
version: "0.12.1"
html5lib:
description: html5lib
source: hosted
version: "0.12.1"
initialize:
description: initialize
source: hosted
version: "0.6.0"
logging:
description: logging
source: hosted
version: "0.9.3"
matcher:
description: matcher
source: hosted
version: "0.11.4+4"
observe:
description: observe
source: hosted
version: "0.13.0+1"
paper_elements:
description: paper_elements
source: hosted
version: "0.6.2+2"
path:
description: path
source: hosted
version: "1.3.3"
polymer:
description: polymer
source: hosted
version: "0.16.0+7"
polymer_expressions:
description: polymer_expressions
source: hosted
version: "0.13.1"
pool:
description: pool
source: hosted
version: "1.0.1"
quiver:
description: quiver
source: hosted
version: "0.21.3"
smoke:
description: smoke
source: hosted
version: "0.3.1+1"
source_maps:
description: source_maps
source: hosted
version: "0.10.0+1"
source_span:
description: source_span
source: hosted
version: "1.0.3"
stack_trace:
description: stack_trace
source: hosted
version: "1.2.4"
string_scanner:
description: string_scanner
source: hosted
version: "0.1.3"
template_binding:
description: template_binding
source: hosted
version: "0.14.0+2"
utf:
description: utf
source: hosted
version: "0.9.0+2"
watcher:
description: watcher
source: hosted
version: "0.9.5"
web_components:
description: web_components
source: hosted
version: "0.11.1+1"
when:
description: when
source: hosted
version: "0.2.0"
which:
description: which
source: hosted
version: "0.1.3"
yaml:
description: yaml
source: hosted
version: "2.1.2"


By adding the line below to pubspec.yaml the problem is solved:
code_transformers: '<= 0.2.5'
polymer: '<= 0.15.5+4'

@jakemac53

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2015

maybe its a windows-specific issue, I will look into that

@tomas234

This comment has been minimized.

Copy link

commented Mar 25, 2015

Awsome, Thanks !

@jakemac53

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2015

Almost certainly its a windows issue actually, because %5C is a backslash ;)

@tomas234

This comment has been minimized.

Copy link

commented Mar 29, 2015

@jakemac53 any luck with this ?

@jakemac53

This comment has been minimized.

Copy link
Contributor

commented Mar 30, 2015

I had to get a windows vm set up and jump through a few hoops to get admin rights, but I am going to take a look today :)

@tomas259

This comment has been minimized.

Copy link
Author

commented Mar 30, 2015

Great Jacob. I'm available today too If you can use my help.

On Mon, Mar 30, 2015, 16:09 Jacob MacDonald notifications@github.com
wrote:

I had to get a windows vm set up and jump through a few hoops to get admin
rights, but I am going to take a look today :)


Reply to this email directly or view it on GitHub
#41 (comment)
.

@tomas259

This comment has been minimized.

Copy link
Author

commented Mar 31, 2015

Tested that it solves my problem. Thanks !!!

On Tue, Mar 31, 2015, 16:15 Jacob MacDonald notifications@github.com
wrote:

Closed #41 #41 via
dart-archive/code_transformers#11
dart-archive/code_transformers#11.


Reply to this email directly or view it on GitHub
#41 (comment).

@jakemac53

This comment has been minimized.

Copy link
Contributor

commented Mar 31, 2015

thanks for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.