View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
17684Bug reportsResponse browsingpublic2021-12-01 09:28
ReporterFRA_RRA Assigned Top_teichmann  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version5.x 
Summary17684: Error 500 while exporting survey results/answers
Description

Hello,
I created 3 very similar surveys for three different regions. The questions are almost the same, except for a few answers.
The surveys are still going but I wanted to export the current state of answers to make a preliminary analysis. I managed to export one of the three surveys but when I tried to export the second and third one, I got an Error 500. I also could not browse the statistics online while I could do it for the first one.

I looked into it with my host to update the version and it didn't change the issue. We are still looking into it but we're running short on solutions, we would really like to know if you've encountered this problem before and if you know how to solve it because we really need those answers.

Maybe as an additional information, I had this issue with Chrome. When I use Firefox and I click the "export" button, the page loads for a fraction of second but nothing else happens. I stay on the same page.

PS: Sorry the error message is in french.

Steps To Reproduce

Steps to reproduce

With my survey still running (I didn't try with a closed survey because I can't close them yet), I select one of them. In "responses" I choose "responses and statistics". In "export" I choose "Export responses". I keep the basic settings and select "Export" in the up-right corner.

Expected result

Downloads a CSV (or any other format) with the responses in it.

Actual result

Error 500 (Chrome) or nothing (Firefox).

TagsNo tags attached.
Attached Files
Bug heat10
Complete LimeSurvey version number (& build)Version 5.1.16+211020
I will donate to the project if issue is resolvedNo
BrowserChrome / Firefox
Database type & version5.7.32-log
Server OS (if known)Linux h2web61 4.9.0-0.bpo.12-amd64 #1 SMP Debian 4.9.210-1~deb8u1 (2020-02-21) x86_64
Webserver software & version (if known)Apache
PHP Version7.4.24

Users monitoring this issue

FRA_RRA

Activities

ollehar

ollehar

2021-10-26 17:03

administrator   ~66939

Can you enable debug = 2 in application/config/config.php and try again, please? Paste the complete error message here.

FRA_RRA

FRA_RRA

2021-10-26 17:06

reporter   ~66941

Last edited: 2021-10-27 10:19

Hi, where can I reach this page?

ollehar

ollehar

2021-10-26 17:16

administrator   ~66943

Last edited: 2021-10-27 10:19

Your system administrator has to apply the change.

FRA_RRA

FRA_RRA

2021-10-27 08:41

reporter   ~66950

Last edited: 2021-10-27 10:19

He did the change, however I cannot reproduce the complete error. I did see it once but I don't remember in what context. Now I can only have the screenshot I showed you (on Chrome).

However, I tried to do the same thing with Safari and I downloaded this file. I honestly don't understand what it is...

results-survey672883.csv (24,305 bytes)   
<!DOCTYPE html PUBLIC
	"-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>SodiumException</title>

<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}

body {
	font: normal 9pt "Verdana";
	color: #000;
	background: #fff;
}

h1 {
	font: normal 18pt "Verdana";
	color: #f00;
	margin-bottom: .5em;
}

h2 {
	font: normal 14pt "Verdana";
	color: #800000;
	margin-bottom: .5em;
}

h3 {
	font: bold 11pt "Verdana";
}

pre {
	font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}

pre span.error {
	display: block;
	background: #fce3e3;
}

pre span.ln {
	color: #999;
	padding-right: 0.5em;
	border-right: 1px solid #ccc;
}

pre span.error-ln {
	font-weight: bold;
}

.container {
	margin: 1em 4em;
}

.version {
	color: gray;
	font-size: 8pt;
	border-top: 1px solid #aaa;
	padding-top: 1em;
	margin-bottom: 1em;
}

.message {
	color: #000;
	padding: 1em;
	font-size: 11pt;
	background: #f3f3f3;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	border-radius: 10px;
	margin-bottom: 1em;
	line-height: 160%;
}

.source {
	margin-bottom: 1em;
}

.code pre {
	background-color: #ffe;
	margin: 0.5em 0;
	padding: 0.5em;
	line-height: 125%;
	border: 1px solid #eee;
}

.source .file {
	margin-bottom: 1em;
	font-weight: bold;
}

.traces {
	margin: 2em 0;
}

.trace {
	margin: 0.5em 0;
	padding: 0.5em;
}

.trace.app {
	border: 1px dashed #c00;
}

.trace .number {
	text-align: right;
	width: 2em;
	padding: 0.5em;
}

.trace .content {
	padding: 0.5em;
}

.trace .plus,
.trace .minus {
	display:inline;
	vertical-align:middle;
	text-align:center;
	border:1px solid #000;
	color:#000;
	font-size:10px;
	line-height:10px;
	margin:0;
	padding:0 1px;
	width:10px;
	height:10px;
}

.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
	display: none;
}

.trace-file {
	cursor: pointer;
	padding: 0.2em;
}

.trace-file:hover {
	background: #f0ffff;
}
/*]]>*/
</style>
</head>

<body>
<div class="container">
	<h1>SodiumException</h1>

	<p class="message">
		Mauvaise clé de déchiffrement ! La clé  de déchiffrement a changé depuis la dernière fois où cette donnée a été sauvegardée donc les données ne peuvent pas être déchiffrées. Veuillez consulter notre manuel à https://manual.limesurvey.org/Data_encryption#Errors.	</p>

	<div class="source">
		<p class="file">/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/core/LSSodium.php(141)</p>
		<div class="code"><pre><span class="ln">129</span>      * Decrypt encrypted string.
<span class="ln">130</span>      * @param string $sEncryptedString Encrypted string to decrypt
<span class="ln">131</span>      * @param bool $bReturnFalseIfError false by default. If TRUE, return false in case of error (bad decryption). Else, return given $encryptedInput value
<span class="ln">132</span>      * @return string Return decrypted value (string or unsezialized object) if suceeded. Return FALSE if an error occurs (bad password/salt given) or inpyt encryptedString
<span class="ln">133</span>      * @throws SodiumException
<span class="ln">134</span>      */
<span class="ln">135</span>     public function decrypt($sEncryptedString, $bReturnFalseIfError = false): string
<span class="ln">136</span>     {
<span class="ln">137</span>         if ($this-&gt;bLibraryExists === true) {
<span class="ln">138</span>             if (!empty($sEncryptedString) &amp;&amp; $sEncryptedString !== &#039;null&#039;) {
<span class="ln">139</span>                 $plaintext = ParagonIE_Sodium_Compat::crypto_secretbox_open(base64_decode($sEncryptedString), $this-&gt;sEncryptionNonce, $this-&gt;sEncryptionSecretBoxKey);
<span class="ln">140</span>                 if ($plaintext === false) {
<span class="error"><span class="ln error-ln">141</span>                     throw new SodiumException(sprintf(gT(&quot;Wrong decryption key! Decryption key has changed since this data were last saved, so data can&#039;t be decrypted. Please consult our manual at %s.&quot;, &#039;unescaped&#039;), &#039;https://manual.limesurvey.org/Data_encryption#Errors&#039;));
</span><span class="ln">142</span>                 } else {
<span class="ln">143</span>                     return $plaintext;
<span class="ln">144</span>                 }
<span class="ln">145</span>             }
<span class="ln">146</span>             return &#039;&#039;;
<span class="ln">147</span>         }
<span class="ln">148</span>         return $sEncryptedString;
<span class="ln">149</span>     }
<span class="ln">150</span> 
<span class="ln">151</span>     /**
<span class="ln">152</span>      *
<span class="ln">153</span>      * Write encryption key to version.php config file
</pre></div>	</div>

	<div class="traces">
		<h2>Stack Trace</h2>
				<table style="width:100%;">
						<tr class="trace app expanded">
			<td class="number">
				#0			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/models/LSActiveRecord.php(460): <strong>LSSodium</strong>-><strong>decrypt</strong>()				</div>

				<div class="code"><pre><span class="ln">455</span>             $updatedValues = $LEM-&gt;getUpdatedValues();
<span class="ln">456</span>             foreach ($attributes as $key =&gt; $attribute) {
<span class="ln">457</span>                 if ($action === &#039;decrypt&#039; &amp;&amp; array_key_exists($key, $updatedValues)) {
<span class="ln">458</span>                     continue;
<span class="ln">459</span>                 }
<span class="error"><span class="ln error-ln">460</span>                 $this-&gt;$key = $sodium-&gt;$action($attribute);
</span><span class="ln">461</span>             }
<span class="ln">462</span>         }
<span class="ln">463</span>     }
<span class="ln">464</span> 
<span class="ln">465</span>     /**
</pre></div>			</td>
		</tr>
						<tr class="trace app expanded">
			<td class="number">
				#1			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/models/LSActiveRecord.php(337): <strong>LSActiveRecord</strong>-><strong>decryptEncryptAttributes</strong>()				</div>

				<div class="code"><pre><span class="ln">332</span>             $sodium = Yii::app()-&gt;sodium;
<span class="ln">333</span> 
<span class="ln">334</span>             return $sodium-&gt;decrypt($value);
<span class="ln">335</span>         } else {
<span class="ln">336</span>             // decrypt attributes
<span class="error"><span class="ln error-ln">337</span>             $this-&gt;decryptEncryptAttributes(&#039;decrypt&#039;);
</span><span class="ln">338</span> 
<span class="ln">339</span>             return $this;
<span class="ln">340</span>         }
<span class="ln">341</span>     }
<span class="ln">342</span> 
</pre></div>			</td>
		</tr>
						<tr class="trace app expanded">
			<td class="number">
				#2			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/helpers/admin/export/Writer.php(313): <strong>LSActiveRecord</strong>-><strong>decrypt</strong>()				</div>

				<div class="code"><pre><span class="ln">308</span>                 $oToken-&gt;decrypt();
<span class="ln">309</span>                 $aResponse = array_merge($aResponse, $oToken-&gt;attributes);
<span class="ln">310</span>             }
<span class="ln">311</span>             $oResponse = Response::model($oSurvey-&gt;id);
<span class="ln">312</span>             $oResponse-&gt;setAttributes($response, false);
<span class="error"><span class="ln error-ln">313</span>             $oResponse-&gt;decrypt();
</span><span class="ln">314</span>             $aResponse = array_merge($aResponse, $oResponse-&gt;attributes);
<span class="ln">315</span> 
<span class="ln">316</span>             $elementArray = array();
<span class="ln">317</span> 
<span class="ln">318</span>             foreach ($oOptions-&gt;selectedColumns as $column) {
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#3			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/helpers/admin/exportresults_helper.php(119): <strong>Writer</strong>-><strong>write</strong>()				</div>

				<div class="code"><pre><span class="ln">114</span>             $offset = $i * $maxRows;
<span class="ln">115</span>             $responsesQuery = $surveyDao-&gt;loadSurveyResults($survey, $oOptions-&gt;responseMinRecord, $oOptions-&gt;responseMaxRecord, $sFilter, $oOptions-&gt;responseCompletionState, $oOptions-&gt;selectedColumns, $oOptions-&gt;aResponses);
<span class="ln">116</span>             $responsesQuery-&gt;offset($offset);
<span class="ln">117</span>             $responsesQuery-&gt;limit($maxRows);
<span class="ln">118</span>             $survey-&gt;responses = $responsesQuery-&gt;query();
<span class="error"><span class="ln error-ln">119</span>             $writer-&gt;write($survey, $sLanguageCode, $oOptions, true);
</span><span class="ln">120</span>         }
<span class="ln">121</span>         $result = $writer-&gt;close();
<span class="ln">122</span>         
<span class="ln">123</span>         // Close resultset if needed
<span class="ln">124</span>         if ($survey-&gt;responses instanceof CDbDataReader) {
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#4			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/controllers/admin/export.php(346): <strong>ExportSurveyResultsService</strong>-><strong>exportResponses</strong>()				</div>

				<div class="code"><pre><span class="ln">341</span>         } else {
<span class="ln">342</span>             $sFilter = &#039;&#039;;
<span class="ln">343</span>         }
<span class="ln">344</span> 
<span class="ln">345</span>         viewHelper::disableHtmlLogging();
<span class="error"><span class="ln error-ln">346</span>         $resultsService-&gt;exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
</span><span class="ln">347</span> 
<span class="ln">348</span>         Yii::app()-&gt;end();
<span class="ln">349</span>     }
<span class="ln">350</span> 
<span class="ln">351</span>     /*
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#5			</td>
			<td class="content">
				<div class="trace-file">
										&nbsp;unknown(0): <strong>export</strong>-><strong>exportresults</strong>()				</div>

							</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#6			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/actions/CAction.php(115): <strong>ReflectionMethod</strong>-><strong>invokeArgs</strong>()				</div>

				<div class="code"><pre><span class="ln">110</span>             elseif($param-&gt;isDefaultValueAvailable())
<span class="ln">111</span>                 $ps[]=$param-&gt;getDefaultValue();
<span class="ln">112</span>             else
<span class="ln">113</span>                 return false;
<span class="ln">114</span>         }
<span class="error"><span class="ln error-ln">115</span>         $method-&gt;invokeArgs($object,$ps);
</span><span class="ln">116</span>         return true;
<span class="ln">117</span>     }
<span class="ln">118</span> }
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#7			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/core/Survey_Common_Action.php(86): <strong>CAction</strong>-><strong>runWithParamsInternal</strong>()				</div>

				<div class="code"><pre><span class="ln">81</span>             $oMethod = new ReflectionMethod($this, $sDefault);
<span class="ln">82</span>         }
<span class="ln">83</span> 
<span class="ln">84</span>         // We&#039;re all good to go, let&#039;s execute it
<span class="ln">85</span>         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
<span class="error"><span class="ln error-ln">86</span>         return parent::runWithParamsInternal($this, $oMethod, $params);
</span><span class="ln">87</span>     }
<span class="ln">88</span> 
<span class="ln">89</span>     /**
<span class="ln">90</span>      * Some functions have different parameters, which are just an alias of the
<span class="ln">91</span>      * usual parameters we&#039;re getting in the url. This function just populates
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#8			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CController.php(308): <strong>Survey_Common_Action</strong>-><strong>runWithParams</strong>()				</div>

				<div class="code"><pre><span class="ln">303</span>     {
<span class="ln">304</span>         $priorAction=$this-&gt;_action;
<span class="ln">305</span>         $this-&gt;_action=$action;
<span class="ln">306</span>         if($this-&gt;beforeAction($action))
<span class="ln">307</span>         {
<span class="error"><span class="ln error-ln">308</span>             if($action-&gt;runWithParams($this-&gt;getActionParams())===false)
</span><span class="ln">309</span>                 $this-&gt;invalidActionParams($action);
<span class="ln">310</span>             else
<span class="ln">311</span>                 $this-&gt;afterAction($action);
<span class="ln">312</span>         }
<span class="ln">313</span>         $this-&gt;_action=$priorAction;
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#9			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CController.php(286): <strong>CController</strong>-><strong>runAction</strong>()				</div>

				<div class="code"><pre><span class="ln">281</span>      * @see runAction
<span class="ln">282</span>      */
<span class="ln">283</span>     public function runActionWithFilters($action,$filters)
<span class="ln">284</span>     {
<span class="ln">285</span>         if(empty($filters))
<span class="error"><span class="ln error-ln">286</span>             $this-&gt;runAction($action);
</span><span class="ln">287</span>         else
<span class="ln">288</span>         {
<span class="ln">289</span>             $priorAction=$this-&gt;_action;
<span class="ln">290</span>             $this-&gt;_action=$action;
<span class="ln">291</span>             CFilterChain::create($this,$action,$filters)-&gt;run();
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#10			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>()				</div>

				<div class="code"><pre><span class="ln">260</span>         {
<span class="ln">261</span>             if(($parent=$this-&gt;getModule())===null)
<span class="ln">262</span>                 $parent=Yii::app();
<span class="ln">263</span>             if($parent-&gt;beforeControllerAction($this,$action))
<span class="ln">264</span>             {
<span class="error"><span class="ln error-ln">265</span>                 $this-&gt;runActionWithFilters($action,$this-&gt;filters());
</span><span class="ln">266</span>                 $parent-&gt;afterControllerAction($this,$action);
<span class="ln">267</span>             }
<span class="ln">268</span>         }
<span class="ln">269</span>         else
<span class="ln">270</span>             $this-&gt;missingAction($actionID);
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#11			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/controllers/AdminController.php(202): <strong>CController</strong>-><strong>run</strong>()				</div>

				<div class="code"><pre><span class="ln">197</span>         }
<span class="ln">198</span> 
<span class="ln">199</span>         $this-&gt;runModuleController($action);
<span class="ln">200</span> 
<span class="ln">201</span> 
<span class="error"><span class="ln error-ln">202</span>         return parent::run($action);
</span><span class="ln">203</span>     }
<span class="ln">204</span> 
<span class="ln">205</span>     /**
<span class="ln">206</span>      * Starting with LS4, 3rd party developper can extends any of the LimeSurve controllers.
<span class="ln">207</span>      *
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#12			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-><strong>run</strong>()				</div>

				<div class="code"><pre><span class="ln">277</span>         {
<span class="ln">278</span>             list($controller,$actionID)=$ca;
<span class="ln">279</span>             $oldController=$this-&gt;_controller;
<span class="ln">280</span>             $this-&gt;_controller=$controller;
<span class="ln">281</span>             $controller-&gt;init();
<span class="error"><span class="ln error-ln">282</span>             $controller-&gt;run($actionID);
</span><span class="ln">283</span>             $this-&gt;_controller=$oldController;
<span class="ln">284</span>         }
<span class="ln">285</span>         else
<span class="ln">286</span>             throw new CHttpException(404,Yii::t(&#039;yii&#039;,&#039;Unable to resolve the request &quot;{route}&quot;.&#039;,
<span class="ln">287</span>                 array(&#039;{route}&#039;=&gt;$route===&#039;&#039;?$this-&gt;defaultController:$route)));
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#13			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>()				</div>

				<div class="code"><pre><span class="ln">136</span>             foreach(array_splice($this-&gt;catchAllRequest,1) as $name=&gt;$value)
<span class="ln">137</span>                 $_GET[$name]=$value;
<span class="ln">138</span>         }
<span class="ln">139</span>         else
<span class="ln">140</span>             $route=$this-&gt;getUrlManager()-&gt;parseUrl($this-&gt;getRequest());
<span class="error"><span class="ln error-ln">141</span>         $this-&gt;runController($route);
</span><span class="ln">142</span>     }
<span class="ln">143</span> 
<span class="ln">144</span>     /**
<span class="ln">145</span>      * Registers the core application components.
<span class="ln">146</span>      * This method overrides the parent implementation by registering additional core components.
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#14			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>()				</div>

				<div class="code"><pre><span class="ln">180</span>     public function run()
<span class="ln">181</span>     {
<span class="ln">182</span>         if($this-&gt;hasEventHandler(&#039;onBeginRequest&#039;))
<span class="ln">183</span>             $this-&gt;onBeginRequest(new CEvent($this));
<span class="ln">184</span>         register_shutdown_function(array($this,&#039;end&#039;),0,false);
<span class="error"><span class="ln error-ln">185</span>         $this-&gt;processRequest();
</span><span class="ln">186</span>         if($this-&gt;hasEventHandler(&#039;onEndRequest&#039;))
<span class="ln">187</span>             $this-&gt;onEndRequest(new CEvent($this));
<span class="ln">188</span>     }
<span class="ln">189</span> 
<span class="ln">190</span>     /**
</pre></div>			</td>
		</tr>
						<tr class="trace app collapsed">
			<td class="number">
				#15			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/index.php(192): <strong>CApplication</strong>-><strong>run</strong>()				</div>

				<div class="code"><pre><span class="ln">187</span> require_once APPPATH . &#039;core/LSYii_Application&#039; . EXT;
<span class="ln">188</span> 
<span class="ln">189</span> $config = require_once(APPPATH . &#039;config/internal&#039; . EXT);
<span class="ln">190</span> 
<span class="ln">191</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">192</span> Yii::createApplication(&#039;LSYii_Application&#039;, $config)-&gt;run();
</span><span class="ln">193</span> 
<span class="ln">194</span> /* End of file index.php */
<span class="ln">195</span> /* Location: ./index.php */
</pre></div>			</td>
		</tr>
				</table>
	</div>

	<div class="version">
		2021-10-27 08:38:39 Apache <a href="http://www.yiiframework.com/">Yii Framework</a>/1.1.24-dev	</div>
</div>

<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");

var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
	if(traceReg.test(e[j].className)){
		e[j].onclick = function(){
			var trace = this.parentNode.parentNode;
			if(collapsedReg.test(trace.className))
				trace.className = trace.className.replace("collapsed", "expanded");
			else
				trace.className = trace.className.replace("expanded", "collapsed");
		}
	}
}
/*]]>*/
</script>

</body>
</html>
results-survey672883.csv (24,305 bytes)   
FRA_RRA

FRA_RRA

2021-10-27 08:44

reporter   ~66951

Last edited: 2021-10-27 10:19

When I download in excel or PDF:


SodiumException

Mauvaise clé de déchiffrement ! La clé de déchiffrement a changé depuis la dernière fois où cette donnée a été sauvegardée donc les données ne peuvent pas être déchiffrées. Veuillez consulter notre manuel à https://manual.limesurvey.org/Data_encryption#Errors.

/home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/core/LSSodium.php(141)

129 Decrypt encrypted string.
130
@param string $sEncryptedString Encrypted string to decrypt
131 @param bool $bReturnFalseIfError false by default. If TRUE, return false in case of error (bad decryption). Else, return given $encryptedInput value
132
@return string Return decrypted value (string or unsezialized object) if suceeded. Return FALSE if an error occurs (bad password/salt given) or inpyt encryptedString
133 @throws SodiumException
134
/
135 public function decrypt($sEncryptedString, $bReturnFalseIfError = false): string
136 {
137 if ($this->bLibraryExists === true) {
138 if (!empty($sEncryptedString) && $sEncryptedString !== 'null') {
139 $plaintext = ParagonIE_Sodium_Compat::crypto_secretbox_open(base64_decode($sEncryptedString), $this->sEncryptionNonce, $this->sEncryptionSecretBoxKey);
140 if ($plaintext === false) {
141 throw new SodiumException(sprintf(gT("Wrong decryption key! Decryption key has changed since this data were last saved, so data can't be decrypted. Please consult our manual at %s.", 'unescaped'), 'https://manual.limesurvey.org/Data_encryption#Errors'));
142 } else {
143 return $plaintext;
144 }
145 }
146 return '';
147 }
148 return $sEncryptedString;
149 }
150
151 /
152
153
Write encryption key to version.php config file
Stack Trace
#0
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/models/LSActiveRecord.php(460): LSSodium->decrypt()
455 $updatedValues = $LEM->getUpdatedValues();
456 foreach ($attributes as $key => $attribute) {
457 if ($action === 'decrypt' && array_key_exists($key, $updatedValues)) {
458 continue;
459 }
460 $this->$key = $sodium->$action($attribute);
461 }
462 }
463 }
464
465 /

#1
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/models/LSActiveRecord.php(337): LSActiveRecord->decryptEncryptAttributes()
332 $sodium = Yii::app()->sodium;
333
334 return $sodium->decrypt($value);
335 } else {
336 // decrypt attributes
337 $this->decryptEncryptAttributes('decrypt');
338
339 return $this;
340 }
341 }
342
#2
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/helpers/admin/export/Writer.php(313): LSActiveRecord->decrypt()
308 $oToken->decrypt();
309 $aResponse = array_merge($aResponse, $oToken->attributes);
310 }
311 $oResponse = Response::model($oSurvey->id);
312 $oResponse->setAttributes($response, false);
313 $oResponse->decrypt();
314 $aResponse = array_merge($aResponse, $oResponse->attributes);
315
316 $elementArray = array();
317
318 foreach ($oOptions->selectedColumns as $column) {
#3
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/helpers/admin/exportresults_helper.php(119): Writer->write()
114 $offset = $i $maxRows;
115 $responsesQuery = $surveyDao->loadSurveyResults($survey, $oOptions->responseMinRecord, $oOptions->responseMaxRecord, $sFilter, $oOptions->responseCompletionState, $oOptions->selectedColumns, $oOptions->aResponses);
116 $responsesQuery->offset($offset);
117 $responsesQuery->limit($maxRows);
118 $survey->responses = $responsesQuery->query();
119 $writer->write($survey, $sLanguageCode, $oOptions, true);
120 }
121 $result = $writer->close();
122
123 // Close resultset if needed
124 if ($survey->responses instanceof CDbDataReader) {
#4
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/controllers/admin/export.php(346): ExportSurveyResultsService->exportResponses()
341 } else {
342 $sFilter = '';
343 }
344
345 viewHelper::disableHtmlLogging();
346 $resultsService->exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
347
348 Yii::app()->end();
349 }
350
351 /

#5
unknown(0): export->exportresults()
#6
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs()
110 elseif($param->isDefaultValueAvailable())
111 $ps[]=$param->getDefaultValue();
112 else
113 return false;
114 }
115 $method->invokeArgs($object,$ps);
116 return true;
117 }
118 }
#7
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/core/Survey_Common_Action.php(86): CAction->runWithParamsInternal()
81 $oMethod = new ReflectionMethod($this, $sDefault);
82 }
83
84 // We're all good to go, let's execute it
85 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
86 return parent::runWithParamsInternal($this, $oMethod, $params);
87 }
88
89 /
90 Some functions have different parameters, which are just an alias of the
91
usual parameters we're getting in the url. This function just populates
#8
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CController.php(308): Survey_Common_Action->runWithParams()
303 {
304 $priorAction=$this->_action;
305 $this->_action=$action;
306 if($this->beforeAction($action))
307 {
308 if($action->runWithParams($this->getActionParams())===false)
309 $this->invalidActionParams($action);
310 else
311 $this->afterAction($action);
312 }
313 $this->_action=$priorAction;
#9
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CController.php(286): CController->runAction()
281 @see runAction
282
/
283 public function runActionWithFilters($action,$filters)
284 {
285 if(empty($filters))
286 $this->runAction($action);
287 else
288 {
289 $priorAction=$this->_action;
290 $this->_action=$action;
291 CFilterChain::create($this,$action,$filters)->run();
#10
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CController.php(265): CController->runActionWithFilters()
260 {
261 if(($parent=$this->getModule())===null)
262 $parent=Yii::app();
263 if($parent->beforeControllerAction($this,$action))
264 {
265 $this->runActionWithFilters($action,$this->filters());
266 $parent->afterControllerAction($this,$action);
267 }
268 }
269 else
270 $this->missingAction($actionID);
#11
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/application/controllers/AdminController.php(202): CController->run()
197 }
198
199 $this->runModuleController($action);
200
201
202 return parent::run($action);
203 }
204
205 /

206 Starting with LS4, 3rd party developper can extends any of the LimeSurve controllers.
207

#12
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CWebApplication.php(282): AdminController->run()
277 {
278 list($controller,$actionID)=$ca;
279 $oldController=$this->_controller;
280 $this->_controller=$controller;
281 $controller->init();
282 $controller->run($actionID);
283 $this->_controller=$oldController;
284 }
285 else
286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
287 array('{route}'=>$route===''?$this->defaultController:$route)));
#13
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/web/CWebApplication.php(141): CWebApplication->runController()
136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
137 $_GET[$name]=$value;
138 }
139 else
140 $route=$this->getUrlManager()->parseUrl($this->getRequest());
141 $this->runController($route);
142 }
143
144 /
145 Registers the core application components.
146
This method overrides the parent implementation by registering additional core components.
#14
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/framework/base/CApplication.php(185): CWebApplication->processRequest()
180 public function run()
181 {
182 if($this->hasEventHandler('onBeginRequest'))
183 $this->onBeginRequest(new CEvent($this));
184 register_shutdown_function(array($this,'end'),0,false);
185 $this->processRequest();
186 if($this->hasEventHandler('onEndRequest'))
187 $this->onEndRequest(new CEvent($this));
188 }
189
190 /

#15
– /home/clients/0c1e2cd5a73d4ed12d8a8e6b4a74b10a/sites/enquete.rra.ch/index.php(192): CApplication->run()
187 require_once APPPATH . 'core/LSYii_Application' . EXT;
188
189 $config = require_once(APPPATH . 'config/internal' . EXT);
190
191 Yii::$enableIncludePath = false;
192 Yii::createApplication('LSYii_Application', $config)->run();
193
194 / End of file index.php /
195 / Location: ./index.php /
2021-10-27 08:42:55 Apache Yii Framework/1.1.24-dev

ollehar

ollehar

2021-10-27 10:17

administrator   ~66961

Last edited: 2021-10-27 10:19

Translation:

Wrong decryption key! The decryption key has changed since the last time this data was saved so the data cannot be decrypted. Please consult our manual at https://manual.limesurvey.org/Data_encryption#Errors.

p_teichmann

p_teichmann

2021-10-27 10:33

administrator   ~66964

Hello,
as far as i can tell from the report, I am assuming you are running a custom installation.

  1. Did you upgrade to LimeSurvey 5 or do you have a fresh installation?
    1.1 If you upgraded from a previous version, did you copy or change the security.php?
  2. What strings currently exist in your security.php (please do not post your key here), it should contain (encryptionkeypair,encryptionpublickey,encryptionsecretkey,encryptionnonce,encryptionsecretboxkey) if your upgraded and (encryptionnonce,encryptionsecretboxkey) if you have a fresh installation.
FRA_RRA

FRA_RRA

2021-10-27 10:36

reporter   ~66965

Hello,
Thank you for both your answers. I'm currently in contact with my system administrator to see if he can do something. Sadly I don't have direct access to these options, hence I cannot answer your questions.
I'll let you know.

FRA_RRA

FRA_RRA

2021-10-28 16:50

reporter   ~66999

Hello,
I now have access to all these things but I'm no expert :)
Anyway, I have the 5 elementy you're talking about because we have made an update. But this update was done AFTER we detected the problem. We thought that by updating the software we would solve the problem. The current installed version is 5.1.16 while the previous version was 4.3.3. the good thing is that we have saves from before the update but also before the creation of the survey and between the creation of the surveys and the update.

To answer your question 1.1: No we didn't actively change any file.

p_teichmann

p_teichmann

2021-10-29 08:38

administrator   ~67002

Thank you for the information, LimeSurvey version 4 was a very unstable version and not recommend for commercial use.

  1. Did you at any point deactivate the survey and reactivate it while restoring the responses?
  2. Is 4.3.3 the first and only version you had installed?
  3. If possible, could you provide us with an export of your database, including your security.php file? You can mark the comment as private. So only staff will be able to read it.
FRA_RRA

FRA_RRA

2021-11-01 08:40

reporter   ~67009

Hello,
Do you have any idea about what I could try to solve this issue? I still cannot access the responses even if they do exist because on the "active survey" page, I see the number of responses displaying.

ollehar

ollehar

2021-11-01 09:17

administrator   ~67010

@FRA_RRA If you answer the questions by p_teichmann he can try to help you.

p_teichmann

p_teichmann

2021-11-01 09:26

administrator   ~67012

That you couldn't see my response earlier was my fault, sorry about that. I will have a look now at what you provided.

FRA_RRA

FRA_RRA

2021-11-01 10:13

reporter   ~67014

Maybe an additional input that may help: while searching this Bug Tracker site, I found a bug that might be similar to mine: https://bugs.limesurvey.org/view.php?id=15934
Which seems to be a doublon of this one : https://bugs.limesurvey.org/view.php?id=15742
Indeed the problem of the first one (15934) seems to be the same as mine and the error he put as screenshot showed on my screen initially but didn't later on (maybe after the update?).

p_teichmann

p_teichmann

2021-11-01 10:19

administrator   ~67015

I had a look at your database and the responses suffer from a bug related to encryption that was existing in limesurvey4 but was fixed in a later version, we don't have code in our software to retroactively fix this since it was a test version.
However, we can run this through some customized code to give you the export of the data. I would have to discuss internally if we want to provide a fix inside the software for it.
If you want us to decrypt the data, we will also need your security.php file. Please ensure it is private again, should you choose to do this.

FRA_RRA

FRA_RRA

2021-11-01 10:23

reporter   ~67016

@p_teichmann , thank you for the information, I guess that was a good idea to indeed update to 5.x.x.
I would gladly ask you to decrypt the data, however, we are still waiting for answers, we will probably close the survey at the end of next week (friday the 12th).
Is it possible to give you the database and the security.php file at this time?

Thank you again

p_teichmann

p_teichmann

2021-11-01 10:32

administrator   ~67017

Last edited: 2021-11-01 10:33

Sure this is not a problem, also any new surveys and responses created should not have the same issue.

p_teichmann

p_teichmann

2021-11-11 14:31

administrator   ~67250

Hello @FRA_RRA,
i will get back to you with the results and send them to your registered email address when done, is this okay for you?
You can expect it to be there by tomorrow.

FRA_RRA

FRA_RRA

2021-11-11 14:32

reporter   ~67251

Yes, that's perfect, thank you very much.

c_schmitz

c_schmitz

2021-12-01 09:28

administrator   ~67630

New version released

Issue History

Date Modified Username Field Change
2021-10-26 17:01 FRA_RRA New Issue
2021-10-26 17:01 FRA_RRA File Added: Capture d’écran 2021-10-26 à 15.18.59.png
2021-10-26 17:02 FRA_RRA Issue Monitored: FRA_RRA
2021-10-26 17:02 FRA_RRA Bug heat 0 => 2
2021-10-26 17:03 ollehar Note Added: 66939
2021-10-26 17:03 ollehar Bug heat 2 => 4
2021-10-26 17:03 ollehar Assigned To => ollehar
2021-10-26 17:03 ollehar Status new => feedback
2021-10-26 17:06 FRA_RRA Note Added: 66941
2021-10-26 17:06 FRA_RRA Bug heat 4 => 6
2021-10-26 17:06 FRA_RRA Status feedback => assigned
2021-10-26 17:16 ollehar Note Added: 66943
2021-10-26 18:08 ollehar Status assigned => feedback
2021-10-27 08:41 FRA_RRA Note Added: 66950
2021-10-27 08:41 FRA_RRA File Added: results-survey672883.csv
2021-10-27 08:41 FRA_RRA Status feedback => assigned
2021-10-27 08:44 FRA_RRA Note Added: 66951
2021-10-27 10:17 ollehar Note Added: 66961
2021-10-27 10:19 ollehar Description Updated
2021-10-27 10:19 ollehar Steps to Reproduce Updated
2021-10-27 10:19 ollehar Zoho Project Synchronization => |Yes|
2021-10-27 10:33 p_teichmann Note Added: 66964
2021-10-27 10:33 p_teichmann Bug heat 6 => 8
2021-10-27 10:36 FRA_RRA Note Added: 66965
2021-10-28 16:50 FRA_RRA Note Added: 66999
2021-10-29 08:38 p_teichmann Note Added: 67002
2021-11-01 08:40 FRA_RRA Note Added: 67009
2021-11-01 08:47 p_teichmann Note View State: 67002: public
2021-11-01 09:17 ollehar Note Added: 67010
2021-11-01 09:26 p_teichmann Note Added: 67012
2021-11-01 10:13 FRA_RRA Note Added: 67014
2021-11-01 10:19 p_teichmann Note Added: 67015
2021-11-01 10:23 FRA_RRA Note Added: 67016
2021-11-01 10:32 p_teichmann Note Added: 67017
2021-11-01 10:33 p_teichmann Note Edited: 67017
2021-11-01 17:23 galads Zoho Project Synchronization Yes =>
2021-11-11 14:31 p_teichmann Note Added: 67250
2021-11-11 14:32 FRA_RRA Note Added: 67251
2021-11-12 20:55 p_teichmann Assigned To ollehar => p_teichmann
2021-11-12 20:55 p_teichmann Status assigned => resolved
2021-11-12 20:55 p_teichmann Resolution open => fixed
2021-12-01 09:28 c_schmitz Note Added: 67630
2021-12-01 09:28 c_schmitz Bug heat 8 => 10
2021-12-01 09:28 c_schmitz Status resolved => closed