Giter Site home page Giter Site logo

Comments (8)

tobiasnteireho avatar tobiasnteireho commented on August 25, 2024

probably related to #241

from a2jviewer.

JessicaFrank avatar JessicaFrank commented on August 25, 2024

May be related to this: https://github.com/CCALI/CAJA/issues/1463

Daisy chain of before logic only pages with no content that bounce users around the GI. In testing, I hit 5 before my interview "broke".

Will update testing notes here tomorrow.

from a2jviewer.

JessicaFrank avatar JessicaFrank commented on August 25, 2024

Theory on what's happening based on heavy testing yesterday in LHI's RebuildQA (which has 8.1.4 version of the viewer from July 2022)--

The daisy chain of logic in NY interviews has been an issue in the past (See ). I think it was a timing issue the last time we saw it -- the logic was skipping too fast over pages and the viewer was getting confused as to what page was supposed to be displayed when.

Here, I think the skipping due to logic is causing the A2J Viewer to think there isn't a variable in a field when there actually is a variable. It's resulting in the viewer inserting [Unassigned Variable 1] and storing the user's answers to subsequent fields in that variable (sometimes over and over again). [Unassigned Variable 1] was a fail safe we built in a couple years ago because authors would mistakenly leave a field without a variable assigned to it, a user would answer it, then the value would get stored in a variable called something like \undefined and HotDocs would break on assembly. [Unassigned Variable 1] is only supposed to be assigned to a field when the field doesn't have a variable at the point in which the user sees it (not automatically assigned to a blank field, but only assigned when a blank field is shown to the user in the viewer).

So I think we need to look into the sequence of when [Unassigned Variable 1] fires. Something about Firefox updating in December 2022 changed how the viewer handles daisy chain logic and causes a race condition where the A2J Viewer thinks the field doesn't have a variable assigned to it.

from a2jviewer.

JessicaFrank avatar JessicaFrank commented on August 25, 2024

I've been trying to build a simpler daisy chain example that breaks like the NY one, but this version has multiple jumps and is still working as expected in a2j.org.

Daisy Chain Jumps (1).zip

from a2jviewer.

mikemitchel avatar mikemitchel commented on August 25, 2024

The race condition cause seems to be confirmed by running Steps-test.js for the viewer. The first 2 tests pass, but the 3rd fails as it has an interview model instead of a list of steps. When you run the 3rd test by itself, it passes. The likely cause is the CanJS bindings/async data synchronization being too slow or suffering from infinite loops. Likely solution is to make sure there is no :bind being used in .stache files, and should only use :to or :from stache bindings to control the flow of data. The sortedAnswers list is also a likely culprit as it is created/sorted each time a page is navigated.

from a2jviewer.

JessicaFrank avatar JessicaFrank commented on August 25, 2024

Note to the reporting author and LHI team:

Here's where I think we are on the Firefox bug reported around the NY interviews. I'm going to focus on just one to simplify our discussions (and I've been testing/able to replicate in that one interview) - the Small Estate Settlement.

The initial report was that the answers were being lost, causing errors in the assembled document that were contingent on true false variables. The underlying answer file had [Unassigned Variable 1] in it in multiple places. Also reports of the interview running slowly in Firefox and having trouble saving answers when testing it on a2jauthor.org in Preview mode.

The good news is that I think we've identified what's happening and we've seen this type of bug before with the IE browser in 2017 and some NY interviews. I think the issue could technically happen in any large interview, but that it might be isolated to a unique way of authoring that is present in the NY interviews.

The bad news is we haven't fixed it yet. We hired our old Bitovi developer Mike to work on it, but he's only on for a set number of hours and debugging the issue has eaten up half of his time. We're trying some fixes today for a couple hours to see if we can knock it out. I'll update you all on the progress of the bug fix.

Long story long, but here's what I think the underlying bug is --- it's a timing issue. The Small Estate Settlement has multiple pages that only contain BEFORE logic. They don't display anything to the end user and push everyone on to another page. I counted 5 in my testing passes where I was able to replicate the [Unassigned Variable 1]. I think these are remnants of authoring in A2J Author 4 which had more limited logic capacity. So essentially the user sees a page, interacts with it, clicks the button to continue, then the viewer fires the goto logic underlying the buttons, sends to a logic only page, and immediately hits logic again to GOTO a different 3rd page. Then the user is shown the 3rd page and interacts with it. This happens multiple times in the interview.

So the A2J Viewer is rapidly jumping the end user to different pages after a single button click. Something in how Firefox is interpreting these jumps is getting the Viewer out of sync. This only presented itself after the Firefox browser update in December 2022 (as far as we know). After these Logic only pages, the viewer will hit a page with variables, display the fields to the user, store the user's answers, but then not realize that there is a variable name assigned to that field. The out of sync Viewer thinks there is a field with no assigned variable. So it defaults to assigning it [Unassigned Variable 1] and storing the user's answer in that variable instead of whatever the actual variable was. We built in this fallback of [Unassigned Variable 1] because authors would forget to put variables in fields and the resulting /undefined variable name would crash the HotDocs assembly. So we're falling back on a failsafe but inappropriately so due to a timing issue. Then when the document is assembled, HotDocs is looking for some other variable and not finding it or any values associated with it because some values have gone into [Unassigned variable 1] instead.

The faster you run through the interview, the worse the out of sync behavior can get. Which is why Sun's testing showed an answer file full of [Unassigned Variable 1]. I was testing and taking notes at the same time, so my answer file only had 1 [Unassigned Variable 1] in it.

While we're working on a fix to the timing issue, there is a work around. Those logic only pages aren't necessary any more in A2J Author. That same logic could be contained in prior pages to remove these "daisy chain" logic only pages. I think that would solve the timing issue.

from a2jviewer.

JessicaFrank avatar JessicaFrank commented on August 25, 2024

Author response:

Hi all!

Oh!!! That makes sense… I still put in those logic only screens because it’s cleaner (in my head) to have everything go to the same place in case I want to change the destination window at some point – so instead of changing it in 5 places, I only have to change it in the forwarding logic window. Or I use them to keep a group of screens together. Also, I like to sort out the variables in a separate window before figuring out where the next goto is – it’s easier to go back to that one window again to fix the logic if I have to.

Some of my interviews are really big with lots of variables to wrangle. I’ll do a review of the interviews that are buggy in Firefox and see if it’s something I can take out without making the whole thing fall apart

from a2jviewer.

tobiasnteireho avatar tobiasnteireho commented on August 25, 2024

assuming related to bad firefox version as in #241

from a2jviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.