Publish Changes - Empty Error

Started by Vince Marco, September 14, 2023, 10:33:34 AM

Previous topic - Next topic

Vince Marco

Hi,

I am new in this forum and I could not find my problem somewhere else.

I tried to publish some changes and it did not work. The thing is that the Refresh that I did this morning worked.

Also, the error message that I get is empty. Indeed I have: "There was an error:" and that is it.

Does anyone have an idea of what I could do?

Thank you

Phil Beauvoir

#1
Hi,

it's impossible to say what the problem could be without more information. Could you provide more details about your git repository, connection setup, credentials, SSH or HTTPS, whether using proxy, firewall, etc. Is the problem only with one repository, or more than one? Have you tested on a different machine? Different credentials? Which version of coArchi?

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Vince Marco

Hi, thank you for your quick answer.

Sadly, I cannot answer your questions as this is a company laptop and configuration so I do not have access to that info.

All I can tell you is that :
- Yes, I am using SSH
- The version of CoArchi 0.8.8
- I have not tested on another machine but my colleagues, who do not know much more than me so they cannot really help, do not have the same issue.

If that is not enough to help no problem, I'll keep searching and comparing with them. Thank you for your time and sorry for the disturbance.

Kr,
Marco

turlututu

#3
Hello, same here.

Some users can commit, some has an empty error message.
I will continue to investigate, but if you have data about it, il would be nice.

What I know :
* Coarchi 8.7 (tried with coarchi 8.6 too, same problem)
* We are using GITLAB, with AD (LDAPS) authentication, HTTPS, no proxy, no firewall
* It is working for some users, not for all
* It happens when data is going to be sent to GIT (no commit is done on GIT, it fails before sending data), checkout is working well for everyone
* It is linked to user account,
   fresh install on new PC for a failing user, coarchi keep failing
   fresh install on new PC for a working user, coarchi works
* It is propably not linked to SSH key (disabled GIT SSH key auth, keep failing or working depending on users)


Problem seems to be here :

@Override
    public RevCommit commitChanges(String commitMessage, boolean amend) throws GitAPIException, IOException {
        try(Git git = Git.open(getLocalRepositoryFolder())) {
            Status status = git.status().call();
           
            // Nothing changed
            if(status.isClean()) {
                return null;
            }
           
            // Check lock file is deleted
            checkDeleteLockFile();
           
            // Add modified files to index
            AddCommand addCommand = git.add();
            addCommand.addFilepattern(".");
            addCommand.setUpdate(false);
            addCommand.call();
           
            // Add missing files to index
            for(String s : status.getMissing()) {
                git.rm().addFilepattern(s).call();
            }
           
            // Commit <= Here it seems to fail
            CommitCommand commitCommand = git.commit(); <= fail here ?
            PersonIdent userDetails = getUserDetails();
            commitCommand.setAuthor(userDetails);
            commitCommand.setMessage(commitMessage);
            commitCommand.setAmend(amend);
            return commitCommand.call(); <= or fail here ?
        }
    }

Can you confirm or infirm those informations please ?

This problem is vicious. No chatty error log, sometimes it works, sometimes it fails...

Thanks.

turlututu

PS:  It is propably not linked to SSH key ON SERVER SIDE

turlututu

Here is the error "message"

Box title is "Publish changes"

Phil Beauvoir

@turlututu I've just released version 0.9.0 of coArchi. This version displays a more informative error dialog with the exception in a text box which you can copy to the clipboard. Please install this version and copy and paste the exception text.

Download here:

https://www.archimatetool.com/plugins/#coArchi
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

Hi,

@turlututu can you be more precise and test the "Commit" action alone ("Publish" is a combined action: it does a local "Commit" if needed, then a refresh from remote, then publish to remote).

If "Commit" fails, then this is not related to your server as this is a 100% local action (no network needed). If it succeed, then the issue is on the other steps of the "Publish" action.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

turlututu

#8
Hello,

The error happends when publish.

I set up the newest archiplugin version I can download on the architool website.

Still having an error still empty. No messagebox appears.

cf. joined pictures.

Maybe, does not throw an exception when fails ?

Phil Beauvoir

@turlututu Looks like you're hitting the one place in the code where an error has occurred when pushing to the remote and where JGit returns an empty message.

I've made a change in coArchi 0.9.1 where it should show something more than an empty string. Please try this version:

https://www.archimatetool.com/plugins/#coArchi
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

turlututu

Thank you for answering so fast.

I will deploy new version ASAP and tell you what will happens

turlututu

here it is.

REJECTED_OTHER_REASON

Phil Beauvoir

That error message is documented as "Rejected for some other reason not covered by another enum value." So it could be anything. I'm afraid I can't help any more with this problem, it could be some configuration or server problem.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

turlututu

Thank you for everything you did.

I will continue to investigate and will tell you here if I can find a solution.

Phil Beauvoir

@turlututu I spent some more time investigating this. Two things are going on here:

1. It turns out that error messages when pushing (publishing) to a remote repository can have a zero byte as the first character. This means the error message is not displayed on Windows.

2. Your issue might be caused by permissions for a branch on the remote repository. On GitHub, I managed to simulate a REJECTED_OTHER_REASON error by creating a branch and setting a protection rule on it to read-only. When I tried to publish to it from coArchi, I could see the error.

I've made a change in coArchi 0.9.2 so that the error messages should now be visible. Please try this version:

https://www.archimatetool.com/plugins/#coArchi
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.