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

akephalos-0.2.5 -> akephalos2-2.0.7 error #20

Closed
phillipkoebbe opened this issue Oct 18, 2011 · 12 comments
Closed

akephalos-0.2.5 -> akephalos2-2.0.7 error #20

phillipkoebbe opened this issue Oct 18, 2011 · 12 comments
Assignees

Comments

@phillipkoebbe
Copy link

A simple project [1] passes using akephalos-0.2.5 but akephalos2-2.0.7 yields this error:

      com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call method "get" of null (http://127.0.0.1:52242/javascripts/application.js?1314045635#3) (NativeException)

when clicking a button. The project is rails 2.3.11 on ruby 1.9.2-p180 and the error occurred on both Mac OS X 10.6 and 10.7.

[1] https://github.com/phillipkoebbe/akephalos-mootools

@Nerian
Copy link
Owner

Nerian commented Oct 18, 2011

Building ffi with native extensions fails to me. I am using 1.9.3dev. I am going to install 1.9.2p180 and see if that's the issue.

@ghost ghost assigned Nerian Oct 18, 2011
@Nerian
Copy link
Owner

Nerian commented Oct 18, 2011

Mmm, the test are passing to me.

Check that you have this on your Gemfile

gem 'akephalos2', '2.0.8', :require => 'akephalos'

@Nerian
Copy link
Owner

Nerian commented Oct 18, 2011

Hold on, I ran the test without using bundle exec. If I use it then it fails.

Let see, let see :)

@Nerian
Copy link
Owner

Nerian commented Oct 18, 2011

Also reproducible with the last version of https://github.com/Nerian/akephalos

@Nerian
Copy link
Owner

Nerian commented Oct 18, 2011

Got it!!

I have run your app with different revisions of akephalos and the one where the failure start to happen is this one:

Nerian/akephalos@59c4c8c

But what was introduced with that commit is nothing more and nothing less that updating HTMLUnit from 2.8 to 2.9. So the problem lies in the dirty insides of HTMLUnit.

@Nerian
Copy link
Owner

Nerian commented Oct 18, 2011

Possibly related: http://sourceforge.net/tracker/?func=detail&aid=3072010&group_id=47038&atid=448266

Seems like an old unsolved problem. We use HTMLUnit 2.10.

@Nerian
Copy link
Owner

Nerian commented Oct 19, 2011

Totally confirmed that is a HTMLUnit issue. I tested the most updated code base of akephalos2 with HTMLUnit 2.8 and it pass your test. Alas, it broke one capybara test:

Capybara::Session with akephalos driver it should behave like session it should behave like fill_in#fill_in should fill in a text field respecting its maxlength attribute
     Failure/Error: extract_results(@session)['zipcode'].should == '52071'
       expected: "52071"
            got: "52071350" (using ==)

Nerian added a commit that referenced this issue Oct 19, 2011
@Nerian
Copy link
Owner

Nerian commented Oct 19, 2011

Added a test to reproduce the bug

@Nerian
Copy link
Owner

Nerian commented Oct 19, 2011

@Nerian
Copy link
Owner

Nerian commented Nov 27, 2011

This issue should be solved now in the branch variable_htmlunit

https://github.com/Nerian/akephalos2/tree/variable_htmlunit

Put this in your Gemfile:

gem 'akephalos2', :git => 'git://github.com/Nerian/akephalos2.git', :branch => 'variable_htmlunit'

And this in your spec_helper:

ENV["htmlunit_version"] = "2.8"

@Nerian
Copy link
Owner

Nerian commented Nov 29, 2011

I merged the branch with master. Let me know if any new bug arises.

Closing.

@Nerian Nerian closed this as completed Nov 29, 2011
@phillipkoebbe
Copy link
Author

Thanks for the updates/work. Just installed 2.1.1.1 and ran test suite on real application. Didn't get original error, but did get another one. Haven't updated demo project yet, but will when I get a chance. Will also create a new issue since it's a different error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants