Error 4166 in Agent (only server) in spite of NO encrypted fields!

I have written an agent using LotusScript, which works fine when started manually.

However, I would like the agent to run on schedule. Two issues arise:

[1] Not entirely sure whether I have the appropriate access rights, but when enabling the agent on the server, I do NOT get an error, which makes me believe that access is fine (also, the fact that the agent runs on the server - see below - would suggest that access is not a problem). - The log suggests that the agent has run at the defined time, but there is no result (the agent should create docs and send out an email, neither of which happens). The log just says “Ran agent on 22,000 documents”. That’s it.

[2] I have read Julie Kadashevich’s various articles (thanks!) on agents, and tried to manually induce the agent to run on the server (i.e. agent.RunOnServer). The agent runs, but without results. When I check the log, it shows Error 4166 (“You must have permission to encrypt documents for server based agents”) in line ### (where I am reading a simple text field from the relevant doc). BUT, the document does not have any encrypted fields, and certainly the field I am reading in this particular line is not encrypted (and neither is the same field in any document in the database).

Any ideas? - I am at the end of my knowledge…

Thank you,

Pascal