IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
873 stars 484 forks source link

XML Parsing Error : duplicate attribute #8931

Open tjouneau opened 2 years ago

tjouneau commented 2 years ago

A user recently submitted a bug report which is exactly the same behaviour as reported in issue #8116. He seems to be the only user currently affected.

What steps does it take to reproduce the issue?

Which version of Dataverse are you using? 5.10

Any related open or closed issues to this bug report? Yes, #8116

Screenshots: No screenshot, but the screenshot displayed in #8116 is exactly what appears on the user's screen. I'm attaching a log excerpt from the moment when the dataset was created.

tjouneau commented 2 years ago

server.log_excerpt.txt

qqmyers commented 2 years ago

Some initial thoughts: The line in the log that has a null pointer appears to be https://github.com/IQSS/dataverse/blob/a57ce53c7c683d05959683de66c03199e465c2ad/src/main/java/edu/harvard/iq/dataverse/UserNotificationServiceBean.java#L113 and the only thing there that could give a null would be if the mailService bean wasn't instantiated.

I don't know how/why that could happen but if that's an issue, I can't see how it would be user, or notification specific. Are other emails going out?

I would guess the XML parsing issue is ~separate, i.e. dataset creation fails and then in reporting that error, the XML being generated is invalid. If it is possible to get the source of that page from the browser it might give a clue.

tjouneau commented 2 years ago

Thanks James for your very quick reply. Yes, the other emails work fine, including to that specific user (in the case of a dataset update for instance). I'm going to ask my user for the source code of the error page. Thomas

tjouneau commented 2 years ago

Hi Here's the source code of the page displaying the error message : dorel_pb.txt Thanks for any insight. Thomas

qqmyers commented 2 years ago

From that file and the XML error in the original description, it appears that https://github.com/IQSS/dataverse/blob/1ef73b050eeaf42dd6ffe9ae735afedefd36fca9/src/main/webapp/resources/iqbs/messages.xhtml#L28 is somehow resulting in multiple onClick attributes for the error message. I don't see any obvious reason for that and there are no recent changes to this xhtml. We have upgraded some libraries like PrimeFaces, so perhaps that has changed something. Another guess would be related to the possibility for special characters in the support team name - easy to check if you can repeat the error, just try a plain ascii name for the support team and if the xml goes away, we'll know there's a bug in handling other chars.

I would still guess that these are separate issues (this and the dataset creation failing). I can't think of any reason why the MailServiceBean would be null just for this call (since mail works elsewhere). If you see this error again, I guess it would be useful to confirm that other email notices are still being sent, i.e. without restarting the server in case the issue is related to some out-of-memory or cache issue. Again - I'm not aware of anyone reporting anything like this, so I'm guessing. Hopefully others will have more insight into what may be going on with the XML and null pointer errors.

tjouneau commented 2 years ago

Hi James, thanks again for your insights!

"easy to check if you can repeat the error, just try a plain ascii name for the support team and if the xml goes away, we'll know there's a bug in handling other chars." This issue only concerns one specific user, so I wonder if a global parameter should play a role in this? Anyway, we tried to rename the support team using only ascii characters. The issue stays the same.

"I guess it would be useful to confirm that other email notices are still being sent, i.e. without restarting the server in case the issue is related to some out-of-memory or cache issue." In our daily use, we didn't notice any missing email. I'm rechcking qith the user if any mail is missing on his side in the publication process (submitted for review, rejected, published...).

Is there any other track we could explore?

What was the final answer to ticket #8116 by @aialves, as it is not clear how it ended?

Thanks

Thomas

qqmyers commented 2 years ago

@aialves closed their own issue and I don't know why/whether a fix was found.

I don't have any other ideas about the cause at this point, so I can only suggest the basics - if it is only happening to one user or one dataset, can you provide details about what might be different for this case? Can it be replicated? Can it be replicated on a 5.11.1 instance? Is there a minimal case that fails that might give a clue. Is there anything in the log about the mail service at startup?

If it can be shown on some test instance, one can set up dataverse to allow interactive editing the xhtml files,etc. to start debugging. We could look in the database as well to understand what may be happening there. The problem is that without some guess as to what's happening, it is very hard to come up with a specific list of tests or things to look at.

So - no magic unless @aialves figured it out. If you can get more clues about what is special about this specific case, hopefully we can spot something that leads to a fix.

tjouneau commented 2 years ago

Thanks! Yes, it only is happening to one specific user, no other user, and no specific dataset. I was thinking that maybe, some operations could be performed to check the health of this user profile in the database? Any suggestions would be appreciated. The difficulty is that the problem is not reproduced in our sandbox instance, for example, so no hope there either to gather some clues. Thanks, Thomas