發表文章

目前顯示的是 11月, 2018的文章

[dApp] remix-ide v0.7.5 發生 remix connection from origin http://localhost:8080 rejected

很好這又是新版本的災情阿,主要是跟remixd的參數整合的問題 發現以下錯誤時 remix connection from origin http://localhost:8080 rejected 請去你的npm的路徑如下 [USER]\AppData\Roaming\npm\node_modules\remix-ide\bin 編輯 remix-ide 檔案 把以下幾行 server.listen(8080, '127.0.0.1', function () {}) var router = new remixd.Router(65520, remixd.services.sharedFolder, (webSocket) => {     remixd.services.sharedFolder.setWebSocket(webSocket)     remixd.services.sharedFolder.setupNotifications(folder)     remixd.services.sharedFolder.sharedFolder(folder)   }) router.start() 變成 server.listen(8080, '127.0.0.1', function () {}) 存檔 再啟動  remix-ide 啟動後再啟動 remixd -s <合約位置> --remix-ide http://127.0.0.1:8080 當然你必須自己先透過 npm 安裝  remixd

如果用node-gyp 6.4.1 在使用 truffle compile 會發生Cannot find module './build/Release/scrypt'

出現以下錯誤 Error: Cannot find module './build/Release/scrypt'     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)     at Function.Module._load (internal/modules/cjs/loader.js:506:25)     at Module.require (internal/modules/cjs/loader.js:636:17)     at require (internal/modules/cjs/helpers.js:20:18)     at Object. (C:\Users\a2924\git\iogtoken\node_modules\scrypt\index.js:3:20)     at Module._compile (internal/modules/cjs/loader.js:688:30)     at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)     at Module.load (internal/modules/cjs/loader.js:598:32)     at tryModuleLoad (internal/modules/cjs/loader.js:537:12)     at Function.Module._load (internal/modules/cjs/loader.js:529:3) 很好這是新板的node-gyp 6.4.1的BUG 這時候要去修改 [專案位置]/ \node_modules\scrypt\index.js 修改以下程式碼 //var scryptNative = require("./build/Release/scrypt") var scryptNative = require("scrypt") 這樣就可以成功了

[Java][Gradle] 不能執行Task Multi-project EAR - "Cannot run tasks for included builds"

圖片
如果使用 Gradle 的 task 卻不能用,顯示 Multi-project EAR - "Cannot run tasks for included builds" 把專案刪除,不要實際把檔案刪除,只是在 Eclipse中的View 移除,重新匯入就可以了,但是確定錯誤已經移除,會發生這個錯誤,是因為專案原本有誤,解決了,但是Task 沒有同步更新

[Java][Gradle] 如果舊版的Gradle 到新版時會發生錯誤

圖片
如果原本是舊版的 gradle 換了新的 gradle,在Eclpse 中會發生錯誤,或是換了一台電腦會發生以下錯誤 Description Resource Path Location Type Unable to load annotation processor factory 'C:\Users\Kirin\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.1.11\ccedfbacef4a6515d2983e3f89ed753d5d4fb665\logback-classic-1.1.11.jar' for project SurfMJoystick SurfMJoystick Annotation processor factory path APT Build Problem 此時要到 把舊的 gradle cache 全選 Remove 這樣就可以解決了

[Dapp] how get a revert message / 在主鍊(mainet)上如何抓取 revert 或 require 的訊息

圖片
down vote favorite 像是以下的範例 用 revert 跳出錯誤訊息 contract Example { function foo (){ revert ( "hello world!!!" ); } } 在 remix IDE在 debug內就可以看了,只是上了主鍊後,要用下面方法看,如下 透過etherscans提供的工具 然後選擇"Remix Debugger". 然後大概要等5~10秒左右,如下圖把處理的Bar 移到最右邊 然後選擇下方的" Memory "選項,然後點擊"眼睛"得圖示 這樣就可以看到,你之前寫的錯誤訊息了 !!