Upload Issues
Troubleshoot problems uploading contracts to BlockSecOps. --- Limit: 50MB (500MB for Enterprise) If your upload is too large: - Exclude nodemodules/ test...
Upload Issues
Troubleshoot problems uploading contracts to BlockSecOps.
"Upload Failed" Error
Check File Size
Limit: 50MB (500MB for Enterprise)
If your upload is too large:
- Exclude
node_modules/test files, build artifacts - Include only essential dependencies
- Split into multiple uploads if needed
Check File Format
Supported formats:
- Individual:
.sol,.vy,.rs - Archives:
.zip,.tar.gz
Not supported: .tar, .rar, .7z
Verify Archive Structure
# Good: Flat or simple structure
project.zip/
├── Token.sol
├── Vault.sol
└── lib/
└── @openzeppelin/
# Bad: Nested archives
project.zip/
└── another.zip # Don't nest archives
"Invalid File" Error
Verify Contract Syntax
Compile locally first:
# Foundry
forge build
# Hardhat
npx hardhat compile
If local compilation fails, fix errors before uploading.
Check Pragma Statement
Ensure valid pragma:
// Good
pragma solidity ^0.8.20;
pragma solidity 0.8.20;
// Bad
pragma solidity; // Missing version
Validate File Encoding
Files must be UTF-8 encoded. Convert if needed:
# Check encoding
file contracts/Token.sol
# Convert to UTF-8
iconv -f ISO-8859-1 -t UTF-8 input.sol > output.sol
"File Not Found" During Scan
Missing Dependencies
Include required dependencies in upload:
Foundry:
zip -r project.zip src/ lib/ foundry.toml remappings.txt
Hardhat:
zip -r project.zip contracts/ node_modules/ hardhat.config.js
Check Import Paths
Verify imports match actual file locations:
// Check this path exists in your upload
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Verify Remappings
Foundry - Include remappings.txt:
@openzeppelin/=lib/openzeppelin-contracts/
Or in foundry.toml:
remappings = [
"@openzeppelin/=lib/openzeppelin-contracts/"
]
Upload Times Out
Large Files
For large uploads:
- Use a faster network connection
- Try during off-peak hours
- Split project into smaller uploads
- Contact Enterprise for higher limits
Browser Issues
Try:
- Different browser
- Disable extensions
- Clear cache
- Check no firewall blocking
API Upload Alternative
Use API for more control:
curl -X POST "https://api.blocksecops.com/api/v1/contracts/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
--max-time 300
"Permission Denied"
Check Plan Limits
Verify you haven't reached:
- Monthly scan limit
- Storage quota
- Team member limit
Check Organization Access
Ensure you have permission to upload:
- Must be Member or higher role
- Must be part of organization
- Project-level access if applicable
Drag-and-Drop Not Working
Browser Compatibility
Drag-and-drop works best in:
- Chrome (recommended)
- Firefox
- Edge
May not work in:
- Older Safari versions
- IE (not supported)
Alternative: File Picker
Click "Browse" or "Select Files" instead of drag-and-drop.
Archive Extraction Errors
Corrupted Archive
Verify archive integrity:
# For zip
unzip -t project.zip
# For tar.gz
tar -tzf project.tar.gz
If corrupted, recreate the archive.
Path Too Long
Windows has 260 character path limit. Solutions:
- Shorten directory names
- Move project closer to root
- Use shorter archive name
Special Characters
Avoid in file/folder names:
- Spaces (use underscores)
- Unicode characters
- Special symbols (!@#$%^&*)
Upload via CLI
If web upload fails, try CLI:
# Install CLI
npm install -g @blocksecops/cli
# Login
blocksecops login
# Upload
blocksecops upload ./contracts
Upload via API
Direct API upload:
# Create archive
zip -r project.zip src/ lib/ foundry.toml
# Upload
curl -X POST "https://api.blocksecops.com/api/v1/contracts/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]"
Response:
{
"id": "contract_abc123",
"name": "project.zip",
"files": 15,
"size": 1048576
}
Still Having Issues?
Gather this info for support:
- Exact error message
- File type and size
- Browser and version
- Steps to reproduce
- Network console errors (F12)
See Contact Support.