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

Errors after upgrading from 4.3.0 to 4.3.1 #171

Open
cjamison opened this issue Mar 2, 2019 · 4 comments
Open

Errors after upgrading from 4.3.0 to 4.3.1 #171

cjamison opened this issue Mar 2, 2019 · 4 comments

Comments

@cjamison
Copy link

cjamison commented Mar 2, 2019

I upgraded this gem from 4.3.0 to 4.3.1. Now when running my tests I am getting errors logged such as:

jQuery.Deferred exception: null is not an object (evaluating 'createdDocument.body') sanitizeHtml@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:15965:49
_getConfig@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16578:39
Tooltip@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16107:36
http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16643:29
each@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:355:23
each@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:190:21
_jQueryInterface@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16633:23
http://localhost:41065/assets/application-7de341d...8b5bd36839.js:66417:41
mightThrow@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:3535:34
http://localhost:41065/assets/application-7de341d...8b5bd36839.js:3603:22 undefined

These errors happen when running rspec using capybara and during a visit command to visit a page.

All the tests seem to be passing, but I am trying to figure out what is causing these errors being logged to the console as the tests are running.

@cjamison
Copy link
Author

cjamison commented Mar 4, 2019

So I traced this to tool tips. When capybara pulls up a page during a test to examine it and a Bootstrap tool tip exists, it fires this off in the log. The test passes; however, does anyone know what might be causing this or how to better trace what is going on?

I am not using any HTML in the tool tip that the new sanitizer might affect. It is just text.

@cjamison
Copy link
Author

cjamison commented Mar 4, 2019

I am able to avoid these errors being logged if I bypass the sanitizer like so:

$('#yourTooltip').tooltip({
  sanitizeFn: function (content) {
    return content
  }
})

Not what I want to do of course, but at least this narrows it down more.

@glebm
Copy link
Member

glebm commented Mar 4, 2019

I doubt this has anything to do with the rubygem in particular. Consider posting your issue upstream.

@brettwgreen
Copy link

Note I had the same exact issue and it was really a problem with PhantomJS... we will consider alternative headless javascript runners
twbs/bootstrap#28695

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

No branches or pull requests

3 participants