Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Form list displayed without connection URL sometimes randomly #798

Open
kkrawczyk123 opened this issue Sep 4, 2019 · 3 comments
Open

Form list displayed without connection URL sometimes randomly #798

kkrawczyk123 opened this issue Sep 4, 2019 · 3 comments
Labels

Comments

@kkrawczyk123
Copy link
Contributor

Software versions

Briefcase v1.17.x, Java v1.11.x, operating system, macOS and Ubuntu 16

Problem description

Form list seems to display but the connection to specific aggregate is not visible, the user is able to pull forms with using the displayed form list. Screenshot attached:
Screenshot from 2019-09-04 14-51-30

Steps to reproduce the problem

I am able to reproduce it in steps:

  1. Connect to aggregate which has a lot of forms which are loaded slowly
  2. Click on Reset button immediately when it is visible

Reproduction steps show a very rare case, but it sometimes happens randomly and I am not 100% sure why.

Expected behavior

Connection URL should be visible on the Pull tab when log in to Aggregate like always.

Other information

the content of log file:
2019-09-04 09:59:29,448 [ForkJoinPool-27-worker-3] ERROR o.o.briefcase.reused.http.Request - Error
org.opendatakit.briefcase.reused.BriefcaseException: org.xmlpull.v1.XmlPullParserException: attr value delimiter missing! (position:START_TAG @1:26 in java.io.InputStreamReader@652b7f34)
at org.opendatakit.briefcase.reused.http.RequestBuilder.readXmlElement(RequestBuilder.java:118)
at java.base/java.util.function.Function.lambda$andThen$1(Function.java:88)
at org.opendatakit.briefcase.reused.http.Request.map(Request.java:62)
at org.opendatakit.briefcase.reused.http.response.Success.from(Success.java:47)
at org.opendatakit.briefcase.reused.http.response.Response.from(Response.java:43)
at org.opendatakit.briefcase.reused.http.CommonsHttp.lambda$uncheckedExecute$1(CommonsHttp.java:130)
at org.apache.http.client.fluent.Response.handleResponse(Response.java:90)
at org.opendatakit.briefcase.reused.http.CommonsHttp.uncheckedExecute(CommonsHttp.java:130)
at org.opendatakit.briefcase.reused.http.CommonsHttp.execute(CommonsHttp.java:87)
at org.opendatakit.briefcase.ui.reused.transfer.sourcetarget.source.PullSource.lambda$aggregate$0(PullSource.java:35)
at org.opendatakit.briefcase.ui.reused.transfer.sourcetarget.AggregateServerDialog.lambda$new$0(AggregateServerDialog.java:44)
at org.opendatakit.briefcase.reused.job.Job.lambda$run$0(Job.java:54)
at org.opendatakit.briefcase.reused.job.JobsRunner.lambda$launchAsync$1(JobsRunner.java:65)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: org.xmlpull.v1.XmlPullParserException: attr value delimiter missing! (position:START_TAG @1:26 in java.io.InputStreamReader@652b7f34)
at org.kxml2.io.KXmlParser.exception(Unknown Source)
at org.kxml2.io.KXmlParser.error(Unknown Source)
at org.kxml2.io.KXmlParser.parseStartTag(Unknown Source)
2019-09-04 10:01:13,445 [AWT-EventQueue-0] INFO XFormParser - Creating FormDef from parsed XML finished in 32.453 ms
at org.kxml2.io.KXmlParser.nextImpl(Unknown Source)
at org.kxml2.io.KXmlParser.nextToken(Unknown Source)
at org.kxml2.kdom.Node.parse(Unknown Source)
at org.kxml2.kdom.Document.parse(Unknown Source)
at org.opendatakit.briefcase.reused.http.RequestBuilder.readXmlElement(RequestBuilder.java:115)
... 18 common frames omitted
2019-09-04 10:01:12,380 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start pulling form and submissions
2019-09-04 10:01:12,383 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading form
2019-09-04 10:01:12,485 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Form downloaded
2019-09-04 10:01:12,490 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start getting submission IDs
2019-09-04 10:01:12,658 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Got all the submission IDs
2019-09-04 10:01:12,669 [ForkJoinPool-30-worker-3] INFO o.o.briefcase.util.FileSystemUtils - Creating database directory /Users/katarzynakrawczyk/Documents/ODK Briefcase Storage/forms/aggregate_release/info.hsqldb
2019-09-04 10:01:13,222 [ForkJoinPool-30-worker-5] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading submission 1 of 6
2019-09-04 10:01:13,223 [ForkJoinPool-30-worker-7] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading submission 2 of 6
2019-09-04 10:01:13,224 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading submission 3 of 6
2019-09-04 10:01:13,273 [ForkJoinPool-30-worker-5] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Submission 1 of 6 downloaded
2019-09-04 10:01:13,273 [ForkJoinPool-30-worker-7] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Submission 2 of 6 downloaded
2019-09-04 10:01:13,279 [ForkJoinPool-30-worker-5] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading submission 4 of 6
2019-09-04 10:01:13,279 [ForkJoinPool-30-worker-7] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading submission 5 of 6
2019-09-04 10:01:13,297 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Submission 3 of 6 downloaded
2019-09-04 10:01:13,299 [ForkJoinPool-30-worker-7] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Submission 5 of 6 downloaded
2019-09-04 10:01:13,299 [ForkJoinPool-30-worker-5] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Submission 4 of 6 downloaded
2019-09-04 10:01:13,301 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Start downloading submission 6 of 6
2019-09-04 10:01:13,312 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Submission 6 of 6 downloaded
2019-09-04 10:01:13,314 [ForkJoinPool-30-worker-3] INFO o.o.b.p.a.PullFromAggregateTracker - Pull aggregate_release - Success
2019-09-04 10:01:13,410 [AWT-EventQueue-0] INFO XFormParser - Reading XML and parsing with kXML2 finished in 0.413 ms
2019-09-04 10:01:13,412 [AWT-EventQueue-0] INFO XFormParser - Consolidating text finished in 1.521 ms
2019-09-04 10:01:13,412 [AWT-EventQueue-0] INFO XFormParser - Parsing form...
2019-09-04 10:01:13,413 [AWT-EventQueue-0] INFO XFormParser - Title: "aggregate_release"

@kkrawczyk123
Copy link
Contributor Author

@ggalmazor Can you take a look if we can do something about that? It gets more serious when it happens randomly.

@ggalmazor ggalmazor added the bug label Oct 1, 2019
@ggalmazor
Copy link
Contributor

So, we have established it's an async issue: when the form list request is slow, the user can reset the connection before the list gets rendered, which produces this confusing state where you have a list of forms and no source configured.

I'd say this is not an issue that prevents the user from working with Briefcase, but it would be nice to avoid confusing states such as this.

@gilbva
Copy link
Contributor

gilbva commented Jan 22, 2020

I created a pull request with a solution for this bug by blocking the reset and reload buttons while the forms are being loaded from the server, i was able to reproduce the bug very consistently by delaying the loading of the forms. I tested as much as i could and I think the solution is satisfactory, but let me know of any issue that may arise.

ggalmazor pushed a commit that referenced this issue Mar 9, 2020
The bug was caused by the fact that the Source/Target panel has no information that the forms are being loaded from the server. Making a call to setWorking() in the current view makes the buttons in the Source/Target panel to go disabled until the unsetWorking method is call. I think this fixes the bug as the user won be able to click on reset (or reload) during the time the forms are being loaded, and also the user will have good feedback.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants