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

ReferenceError: fragment is not defined #2653

Closed
Kentoseth opened this issue Oct 17, 2021 · 3 comments
Closed

ReferenceError: fragment is not defined #2653

Kentoseth opened this issue Oct 17, 2021 · 3 comments
Assignees
Labels
🐛Bug Something isn't working Module: Annotation
Milestone

Comments

@Kentoseth
Copy link

Describe the bug
When I annotate a word using the POS layer, after selecting the word, the screen goes blank minus a thin blue line. See screenshot:

bug

Version: inception-app-webapp-21.0.1-standalone.jar
OS: Ubuntu 20.04(container)

To Reproduce
Steps to reproduce the behavior:

  1. Start Inception: java -Djava.awt.headless=true -Dserver.port=8999 -Dserver.ip=0.0.0.0 -jar inception-app-webapp-21.0.1-standalone.jar
  2. Create project with attached file(file can't be attached, so create hadith1.txt with this string: النِّساءُ حَبائِلُ الشَيْطانِ)
  3. Go to Annotate, try to add POS layer, bug happens in both Firefox and Brave.
  4. No error in app-log, but error is found in browser-tools. Pasting below:
Rendering terminated due to: ReferenceError: fragment is not defined 
calculateSubstringWidthRobust@http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1539:5
calculateChunkTextMeasures/Visualizer<@http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1513:28
getTextMeasurements/</<@http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1443:9
each@http://10.0.3.48:8999/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js:2:2861
getTextMeasurements/<@http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1442:3
each@http://10.0.3.…
visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:3420:9
    renderData http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:3420
    (Async: setTimeout handler)
    renderData http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:3414
    post http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratDispatcherResourceReference/dispatcher-ver-B99CA8F8CFB68625E75A99A6A27AA1DF.js:89
    each jQuery
    post http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratDispatcherResourceReference/dispatcher-ver-B99CA8F8CFB68625E75A99A6A27AA1DF.js:78
    <anonymous> http://10.0.3.48:8999/p/zaad/annotate/?14#!d=0&f=1 line 1 > injectedScript:1
    <anonymous> http://10.0.3.48:8999/p/zaad/annotate/?14#!d=0&f=1 line 1 > injectedScript:1
    jQuery 45
    ajaxCall http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratAjaxResourceReference/ajax-ver-FCB474B61313C44E6BE1FCAA984E0CD4.js:26
    post http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratDispatcherResourceReference/dispatcher-ver-B99CA8F8CFB68625E75A99A6A27AA1DF.js:89

Expected behavior
POS tag to work and not give this error.

Screenshots
See above.

Please complete the following information:

  • Version and build ID: INCEpTION -- 21.0.1 (2021-10-11 23:50:35, build db19cae)
  • OS: Ubuntu 20.04
  • Browser: Firefox and Brave

Additional context
This is a RtL language. I tested with other layers and the same error occurs.

@reckart
Copy link
Member

reckart commented Oct 17, 2021

Could you please try in Chrome?

@reckart reckart added this to the 21.1 milestone Oct 17, 2021
@Kentoseth
Copy link
Author

Could you please try in Chrome?

I use Brave, which has the same rendering engine as Chrome. The browser error-output from it is:

visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:3420 Rendering terminated due to: ReferenceError: fragment is not defined ReferenceError: fragment is not defined
    at Visualizer.calculateSubstringWidthRobust (http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1539:1)
    at http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1513:28
    at Fragment.<anonymous> (http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1443:1)
    at Function.each (http://10.0.3.48:8999/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js:2:2861)
    at SVGTextElement.<anonymous> (http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1442:3)
    at Function.each (http://10.0.3.48:8999/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js:2:2861)
    at n.fn.init.each (http://10.0.3.48:8999/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js:2:845)
    at Visualizer.getTextMeasurements (http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1438:34)
    at Visualizer.calculateChunkTextMeasures (http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1475:13)
    at Visualizer.calculateTextMeasurements (http://10.0.3.48:8999/wicket/resource/de.tudarmstadt.ukp.clarin.webanno.brat.resource.BratVisualizerResourceReference/visualizer-ver-61D190B4DEBE18B2C29B4672DFCB97F8.js:1453:24)

I can try in Chrome, but would prefer not to use it because of its binary blobs.

@reckart
Copy link
Member

reckart commented Oct 17, 2021

Ok. No problem. Firefox and Chrome-based browsers use a different branch in some RTL code, that is why I asked. Thanks for reporting, I'll look into it.

@reckart reckart self-assigned this Oct 17, 2021
@reckart reckart changed the title Browser/JavaScript bug ReferenceError: fragment is not defined Oct 18, 2021
reckart added a commit that referenced this issue Oct 18, 2021
- Fix access to undefined variable
- Improve handling of row-initial and row-final spacing in RTL mode
reckart added a commit that referenced this issue Oct 19, 2021
…Error-fragment-is-not-defined

#2653 - ReferenceError: fragment is not defined
@reckart reckart closed this as completed Oct 19, 2021
reckart added a commit that referenced this issue Oct 19, 2021
* release/21.x:
  #2653 - ReferenceError: fragment is not defined
  #2655 - Curated CASes are exported to the wrong spot
  #2654 - Programmatically created AnnotationLayers are not curatable
reckart added a commit that referenced this issue Oct 19, 2021
* main:
  #2653 - ReferenceError: fragment is not defined
  #2655 - Curated CASes are exported to the wrong spot
  #2654 - Programmatically created AnnotationLayers are not curatable
  No issue. Mini-optimizatioin: load workload settings only once.
  No issue. Add JavaDoc.
  No issue. Fix potential race condition when creating workload management settings by synchronizing the loadOrCreateWorkloadManagerConfiguration method.
  #1778 - Make tokenization editable
  #1778 - Make tokenization editable
  No issue. Bunch of small fixes
  #2656 - Constructor injection for most project exporters
reckart added a commit that referenced this issue Oct 19, 2021
…-curation

* main:
  #2653 - ReferenceError: fragment is not defined
  #2655 - Curated CASes are exported to the wrong spot
  #2654 - Programmatically created AnnotationLayers are not curatable
reckart added a commit that referenced this issue Oct 19, 2021
* main: (74 commits)
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-21.1
  #2642 - Extensible merge strategies for curation
  #2667 - Add format IDs to format documentation
  #2666 - CoNLL 2000 and CoNLL 2002 format IDs are mixed up
  #2642 - Extensible merge strategies for curation
  #2653 - ReferenceError: fragment is not defined
  #2655 - Curated CASes are exported to the wrong spot
  #2654 - Programmatically created AnnotationLayers are not curatable
  #1778 - Make tokenization editable
  #2642 - Extensible merge strategies for curation
  #1778 - Make tokenization editable
  No issue. Mini-optimizatioin: load workload settings only once.
  No issue. Add JavaDoc.
  No issue. Fix potential race condition when creating workload management settings by synchronizing the loadOrCreateWorkloadManagerConfiguration method.
  #1778 - Make tokenization editable
  #1778 - Make tokenization editable
  No issue. Bunch of small fixes
  #2656 - Constructor injection for most project exporters
  No issue. Make form more concise.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Annotation
Projects
Archived in project
Development

No branches or pull requests

2 participants